2012-05-15 Mark Pilgrim <pilgrim@chromium.org>
+ [Chromium] Move createMessagePortChannel to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85764
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::createMessagePortChannel):
+ * chromium/public/WebMessagePortChannel.h: Added.
+ (WebKit):
+ (WebMessagePortChannel):
+ (WebKit::WebMessagePortChannel::~WebMessagePortChannel):
+ * chromium/public/WebMessagePortChannelClient.h: Added.
+ (WebKit):
+ (WebMessagePortChannelClient):
+ (WebKit::WebMessagePortChannelClient::~WebMessagePortChannelClient):
+
+2012-05-15 Mark Pilgrim <pilgrim@chromium.org>
+
[Chromium] Move blobRegistry to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=85765
'chromium/public/WebMediaStreamDescriptor.h',
'chromium/public/WebMediaStreamSource.h',
'chromium/public/WebMediaStreamSourcesRequest.h',
+ 'chromium/public/WebMessagePortChannel.h',
+ 'chromium/public/WebMessagePortChannelClient.h',
'chromium/public/WebMimeRegistry.h',
'chromium/public/WebNonCopyable.h',
'chromium/public/WebPeerConnection00Handler.h',
class WebFileSystem;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
+class WebMessagePortChannel;
class WebMimeRegistry;
class WebPeerConnection00Handler;
class WebPeerConnection00HandlerClient;
virtual size_t highUsageDeltaMB() { return 128; }
+ // Message Ports -------------------------------------------------------
+
+ // Creates a Message Port Channel. This can be called on any thread.
+ // The returned object should only be used on the thread it was created on.
+ virtual WebMessagePortChannel* createMessagePortChannel() { return 0; }
+
+
// Network -------------------------------------------------------------
// Returns a new WebURLLoader instance.
--- /dev/null
+/*
+ * Copyright (C) 2009 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebMessagePortChannel_h
+#define WebMessagePortChannel_h
+
+#include "WebCommon.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebMessagePortChannelClient;
+class WebString;
+
+typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
+
+// Provides an interface to a Message Port Channel implementation. The object owns itself and
+// is signalled that its not needed anymore with the destroy() call.
+class WebMessagePortChannel {
+public:
+ virtual void setClient(WebMessagePortChannelClient*) = 0;
+ virtual void destroy() = 0;
+ // WebKit versions of WebCore::MessagePortChannel.
+ virtual void entangle(WebMessagePortChannel*) = 0;
+ // Callee receives ownership of the passed vector.
+ virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0;
+ virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0;
+
+protected:
+ ~WebMessagePortChannel() { }
+};
+
+} // namespace WebKit
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2009 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebMessagePortChannelClient_h
+#define WebMessagePortChannelClient_h
+
+namespace WebKit {
+
+// Provides an interface for users of WebMessagePortChannel to be notified
+// when messages are available.
+class WebMessagePortChannelClient {
+public:
+ // Alerts that new messages have arrived, which are retrieved by calling
+ // WebMessagePortChannel::tryGetMessage. Note that this may be called
+ // on any thread.
+ virtual void messageAvailable() = 0;
+
+protected:
+ ~WebMessagePortChannelClient() { }
+};
+
+} // namespace WebKit
+
+#endif
+2012-05-15 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Move createMessagePortChannel to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85764
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * WebKit.gyp:
+ * public/WebMessagePortChannel.h:
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKit::WebKitPlatformSupport::injectIDBKeyIntoSerializedValue):
+ * src/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
+ * src/PlatformMessagePortChannel.h:
+ * src/SharedWorkerRepository.cpp:
+ * src/WebSharedWorkerImpl.cpp:
+ * src/WebWorkerClientImpl.cpp:
+
2012-05-15 Fady Samuel <fsamuel@chromium.org>
[Chromium] Reset ScriptInstance in HTMLPlugInElement on WebPluginContainerImpl::setPlugin
'public/WebMediaPlayerClient.h',
'public/WebMediaStreamRegistry.h',
'public/WebMenuItemInfo.h',
- 'public/WebMessagePortChannel.h',
- 'public/WebMessagePortChannelClient.h',
'public/WebNavigationType.h',
'public/WebNetworkStateNotifier.h',
'public/WebNode.h',
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebMessagePortChannel_h
-#define WebMessagePortChannel_h
-
-#include "platform/WebCommon.h"
-#include "platform/WebVector.h"
-
-namespace WebKit {
-
-class WebMessagePortChannelClient;
-class WebString;
-
-typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
-
-// Provides an interface to a Message Port Channel implementation. The object owns itself and
-// is signalled that its not needed anymore with the destroy() call.
-class WebMessagePortChannel {
-public:
- virtual void setClient(WebMessagePortChannelClient*) = 0;
- virtual void destroy() = 0;
- // WebKit versions of WebCore::MessagePortChannel.
- virtual void entangle(WebMessagePortChannel*) = 0;
- // Callee receives ownership of the passed vector.
- virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0;
- virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0;
-
-protected:
- ~WebMessagePortChannel() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../Platform/chromium/public/WebMessagePortChannel.h"
class WebFileUtilities;
class WebIDBFactory; // FIXME: Does this belong in platform?
class WebIDBKey; // FIXME: Does this belong in platform?
-class WebMessagePortChannel; // FIXME: Does this belong in platform?
class WebPluginListBuilder; // FIXME: Does this belong in platform?
class WebSandboxSupport;
class WebSharedWorkerRepository; // FIXME: Does this belong in platform?
virtual WebSerializedScriptValue injectIDBKeyIntoSerializedValue(const WebIDBKey& key, const WebSerializedScriptValue& value, const WebIDBKeyPath& keyPath) { return WebSerializedScriptValue(); }
- // Message Ports -------------------------------------------------------
-
- // Creates a Message Port Channel. This can be called on any thread.
- // The returned object should only be used on the thread it was created on.
- virtual WebMessagePortChannel* createMessagePortChannel() { return 0; }
-
-
// Plugins -------------------------------------------------------------
// If refresh is true, then cached information should not be used to
#include "SerializedScriptValue.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "WebMessagePortChannel.h"
#include "platform/WebString.h"
+#include <public/Platform.h>
+#include <public/WebMessagePortChannel.h>
+
using namespace WebKit;
namespace WebCore {
PlatformMessagePortChannel::PlatformMessagePortChannel()
: m_localPort(0)
{
- m_webChannel = webKitPlatformSupport()->createMessagePortChannel();
+ m_webChannel = WebKit::Platform::current()->createMessagePortChannel();
if (m_webChannel)
m_webChannel->setClient(this);
}
#ifndef PlatformMessagePortChannel_h
#define PlatformMessagePortChannel_h
-#include "WebMessagePortChannelClient.h"
#include "MessagePortChannel.h"
+#include <public/WebMessagePortChannelClient.h>
#include <wtf/PassRefPtr.h>
#include <wtf/Threading.h>
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebKit.h"
-#include "WebMessagePortChannel.h"
#include "WebSharedWorker.h"
#include "WebSharedWorkerRepository.h"
#include "platform/WebKitPlatformSupport.h"
#include "platform/WebURL.h"
#include "WorkerScriptLoader.h"
#include "WorkerScriptLoaderClient.h"
+#include <public/WebMessagePortChannel.h>
namespace WebCore {
#include "WebFileError.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
-#include "WebMessagePortChannel.h"
#include "WebRuntimeFeatures.h"
#include "WebSettings.h"
#include "WebSharedWorkerClient.h"
#include "WorkerThread.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
+#include <public/WebMessagePortChannel.h>
#include <wtf/MainThread.h>
using namespace WebCore;
#include "WebFrameImpl.h"
#include "WebKit.h"
#include "platform/WebKitPlatformSupport.h"
-#include "WebMessagePortChannel.h"
#include "WebPermissionClient.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "WebViewImpl.h"
+#include <public/WebMessagePortChannel.h>
+
using namespace WebCore;
namespace WebKit {