Diff
Modified: trunk/Source/Platform/ChangeLog (117537 => 117538)
--- trunk/Source/Platform/ChangeLog 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/Platform/ChangeLog 2012-05-18 04:37:37 UTC (rev 117538)
@@ -1,3 +1,27 @@
+2012-05-17 Mark Pilgrim <pilg...@chromium.org>
+
+ [Chromium] Move Web Workers methods to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=86799
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::didStartWorkerRunLoop):
+ (WebKit::Platform::didStopWorkerRunLoop):
+ * chromium/public/WebWorkerRunLoop.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebWorkerRunLoop):
+ (Task):
+ (WebKit::WebWorkerRunLoop::Task::~Task):
+ (WebKit::operator==):
+ (WebKit::operator<):
+
2012-05-17 Dana Jansens <dan...@chromium.org>
[chromium] Scale all compositor output by the defaultDeviceScaleFactor
Modified: trunk/Source/Platform/Platform.gypi (117537 => 117538)
--- trunk/Source/Platform/Platform.gypi 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/Platform/Platform.gypi 2012-05-18 04:37:37 UTC (rev 117538)
@@ -107,6 +107,7 @@
'chromium/public/WebVector.h',
'chromium/public/WebVideoFrame.h',
'chromium/public/WebVideoFrameProvider.h',
+ 'chromium/public/WebWorkerRunLoop.h',
'chromium/src/Platform.cpp',
'chromium/src/WebCString.cpp',
'chromium/src/WebFloatQuad.cpp',
Modified: trunk/Source/Platform/chromium/public/Platform.h (117537 => 117538)
--- trunk/Source/Platform/chromium/public/Platform.h 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/Platform/chromium/public/Platform.h 2012-05-18 04:37:37 UTC (rev 117538)
@@ -56,6 +56,7 @@
class WebURLLoader;
class WebSocketStreamHandle;
class WebThread;
+class WebWorkerRunLoop;
class Platform {
public:
@@ -328,6 +329,12 @@
// May return null if WebRTC functionality is not avaliable or out of resources.
virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterClient*) { return 0; }
+
+ // WebWorker ----------------------------------------------------------
+
+ virtual void didStartWorkerRunLoop(const WebWorkerRunLoop&) { }
+ virtual void didStopWorkerRunLoop(const WebWorkerRunLoop&) { }
+
protected:
~Platform() { }
};
Copied: trunk/Source/Platform/chromium/public/WebWorkerRunLoop.h (from rev 117537, trunk/Source/WebKit/chromium/public/WebWorkerRunLoop.h) (0 => 117538)
--- trunk/Source/Platform/chromium/public/WebWorkerRunLoop.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebWorkerRunLoop.h 2012-05-18 04:37:37 UTC (rev 117538)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebWorkerRunLoop_h
+#define WebWorkerRunLoop_h
+
+#include "WebCommon.h"
+
+namespace WebCore {
+class WorkerRunLoop;
+}
+
+namespace WebKit {
+
+class WebWorkerRunLoop {
+public:
+ class Task {
+ public:
+ virtual ~Task() { }
+ virtual void Run() = 0;
+ };
+ WEBKIT_EXPORT void postTask(Task*);
+ WEBKIT_EXPORT bool equals(const WebWorkerRunLoop&) const;
+ WEBKIT_EXPORT bool lessThan(const WebWorkerRunLoop&) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebWorkerRunLoop(WebCore::WorkerRunLoop*);
+#endif
+
+private:
+ WebCore::WorkerRunLoop* m_workerRunLoop;
+};
+
+inline bool operator==(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator<(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
+{
+ return a.lessThan(b);
+}
+
+}
+
+#endif
Modified: trunk/Source/WebKit/chromium/ChangeLog (117537 => 117538)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-18 04:37:37 UTC (rev 117538)
@@ -1,3 +1,21 @@
+2012-05-17 Mark Pilgrim <pilg...@chromium.org>
+
+ [Chromium] Move Web Workers methods to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=86799
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * WebKit.gyp:
+ * public/WebWorkerRunLoop.h:
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKitPlatformSupport):
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::didStartWorkerRunLoop):
+ (WebCore::PlatformSupport::didStopWorkerRunLoop):
+
2012-05-17 Dana Jansens <dan...@chromium.org>
[chromium] Scale all compositor output by the defaultDeviceScaleFactor
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (117537 => 117538)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-18 04:37:37 UTC (rev 117538)
@@ -283,7 +283,6 @@
'public/WebWidget.h',
'public/WebWidgetClient.h',
'public/WebWorkerInfo.h',
- 'public/WebWorkerRunLoop.h',
'public/android/WebInputEventFactory.h',
'public/android/WebSandboxSupport.h',
'public/gtk/WebInputEventFactory.h',
Modified: trunk/Source/WebKit/chromium/public/WebWorkerRunLoop.h (117537 => 117538)
--- trunk/Source/WebKit/chromium/public/WebWorkerRunLoop.h 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/WebKit/chromium/public/WebWorkerRunLoop.h 2012-05-18 04:37:37 UTC (rev 117538)
@@ -22,46 +22,4 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebWorkerRunLoop_h
-#define WebWorkerRunLoop_h
-
-#include "platform/WebCommon.h"
-
-namespace WebCore {
-class WorkerRunLoop;
-}
-
-namespace WebKit {
-
-class WebWorkerRunLoop {
-public:
- class Task {
- public:
- virtual ~Task() { }
- virtual void Run() = 0;
- };
- WEBKIT_EXPORT void postTask(Task*);
- WEBKIT_EXPORT bool equals(const WebWorkerRunLoop&) const;
- WEBKIT_EXPORT bool lessThan(const WebWorkerRunLoop&) const;
-
-#if WEBKIT_IMPLEMENTATION
- WebWorkerRunLoop(WebCore::WorkerRunLoop*);
-#endif
-
-private:
- WebCore::WorkerRunLoop* m_workerRunLoop;
-};
-
-inline bool operator==(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
-{
- return a.equals(b);
-}
-
-inline bool operator<(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
-{
- return a.lessThan(b);
-}
-
-}
-
-#endif
+#include "../../../Platform/chromium/public/WebWorkerRunLoop.h"
Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (117537 => 117538)
--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-18 04:37:37 UTC (rev 117538)
@@ -59,7 +59,6 @@
class WebSharedWorkerRepository; // FIXME: Does this belong in platform?
class WebStorageNamespace; // FIXME: Does this belong in platform?
class WebThemeEngine;
-class WebWorkerRunLoop;
// FIXME: Eventually all these API will need to move to WebKit::Platform.
class WebKitPlatformSupport : public Platform {
@@ -158,11 +157,6 @@
virtual bool canAccelerate2dCanvas() { return false; }
- // WebWorker ----------------------------------------------------------
-
- virtual void didStartWorkerRunLoop(const WebWorkerRunLoop&) { }
- virtual void didStopWorkerRunLoop(const WebWorkerRunLoop&) { }
-
protected:
~WebKitPlatformSupport() { }
};
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (117537 => 117538)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-18 04:33:59 UTC (rev 117537)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-18 04:37:37 UTC (rev 117538)
@@ -48,7 +48,6 @@
#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "WebWorkerClientImpl.h"
-#include "WebWorkerRunLoop.h"
#include "platform/WebAudioBus.h"
#include "platform/WebCookie.h"
#include "platform/WebCookieJar.h"
@@ -96,6 +95,7 @@
#include "WorkerContextProxy.h"
#include <public/WebClipboard.h>
#include <public/WebMimeRegistry.h>
+#include <public/WebWorkerRunLoop.h>
#include <wtf/Assertions.h>
// We are part of the WebKit implementation.
@@ -906,12 +906,12 @@
#if ENABLE(WORKERS)
void PlatformSupport::didStartWorkerRunLoop(WorkerRunLoop* loop)
{
- webKitPlatformSupport()->didStartWorkerRunLoop(WebWorkerRunLoop(loop));
+ WebKit::Platform::current()->didStartWorkerRunLoop(WebWorkerRunLoop(loop));
}
void PlatformSupport::didStopWorkerRunLoop(WorkerRunLoop* loop)
{
- webKitPlatformSupport()->didStopWorkerRunLoop(WebWorkerRunLoop(loop));
+ WebKit::Platform::current()->didStopWorkerRunLoop(WebWorkerRunLoop(loop));
}
WorkerContextProxy* WorkerContextProxy::create(Worker* worker)