Diff
Modified: trunk/Source/WebKit2/ChangeLog (142159 => 142160)
--- trunk/Source/WebKit2/ChangeLog 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/ChangeLog 2013-02-07 19:58:36 UTC (rev 142160)
@@ -1,3 +1,51 @@
+2013-02-06 Sam Weinig <[email protected]>
+
+ Make WebPageProxy and sub-objects MessageReceivers
+ https://bugs.webkit.org/show_bug.cgi?id=108785
+
+ Reviewed by Anders Carlsson.
+
+ * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
+ (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
+ (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
+ * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
+ (CoordinatedLayerTreeHostProxy):
+ * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::contentsRect):
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::setVisibleContentsRect):
+ * UIProcess/DrawingAreaProxy.messages.in:
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
+ * UIProcess/DrawingAreaProxyImpl.h:
+ * UIProcess/WebFullScreenManagerProxy.cpp:
+ (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
+ * UIProcess/WebFullScreenManagerProxy.h:
+ (WebFullScreenManagerProxy):
+ * UIProcess/WebFullScreenManagerProxy.messages.in:
+ * UIProcess/WebInspectorProxy.cpp:
+ (WebKit::WebInspectorProxy::WebInspectorProxy):
+ (WebKit::WebInspectorProxy::invalidate):
+ * UIProcess/WebInspectorProxy.h:
+ * UIProcess/WebInspectorProxy.messages.in:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::reattachToWebProcess):
+ (WebKit::WebPageProxy::close):
+ (WebKit::WebPageProxy::inspector):
+ (WebKit::WebPageProxy::fullScreenManager):
+ (WebKit::WebPageProxy::processDidCrash):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::didReceiveMessage):
+ (WebKit::WebProcessProxy::didReceiveSyncMessage):
+ * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
+ (WebKit::WebFullScreenManagerProxy::invalidate):
+
2013-02-07 Zan Dobersek <[email protected]>
[Autotools] Remove uses of Automake FARSTREAM_(CFLAGS|LIBS) variables, USE_FARSTREAM conditional
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -23,6 +23,7 @@
#include "CoordinatedLayerTreeHostProxy.h"
#include "CoordinatedLayerTreeHostMessages.h"
+#include "CoordinatedLayerTreeHostProxyMessages.h"
#include "WebCoreArgumentCoders.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
@@ -42,10 +43,12 @@
: m_drawingAreaProxy(drawingAreaProxy)
, m_scene(adoptRef(new CoordinatedGraphicsScene(this)))
{
+ m_drawingAreaProxy->page()->process()->addMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_drawingAreaProxy->page()->pageID(), this);
}
CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy()
{
+ m_drawingAreaProxy->page()->process()->removeMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_drawingAreaProxy->page()->pageID());
m_scene->detach();
}
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -47,7 +47,7 @@
namespace WebKit {
-class CoordinatedLayerTreeHostProxy : public WebCore::CoordinatedGraphicsSceneClient {
+class CoordinatedLayerTreeHostProxy : public WebCore::CoordinatedGraphicsSceneClient, public CoreIPC::MessageReceiver {
WTF_MAKE_NONCOPYABLE(CoordinatedLayerTreeHostProxy);
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -77,7 +77,6 @@
void updateImageBacking(WebCore::CoordinatedImageBackingID, const WebCoordinatedSurface::Handle&);
void clearImageBackingContents(WebCore::CoordinatedImageBackingID);
void removeImageBacking(WebCore::CoordinatedImageBackingID);
- void didReceiveCoordinatedLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
void didChangeScrollPosition(const WebCore::FloatPoint& position);
#if USE(GRAPHICS_SURFACE)
void createCanvas(WebCore::CoordinatedLayerID, const WebCore::IntSize&, const WebCore::GraphicsSurfaceToken&);
@@ -104,6 +103,9 @@
protected:
void dispatchUpdate(const Function<void()>&);
+ // CoreIPC::MessageReceiver
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+
DrawingAreaProxy* m_drawingAreaProxy;
RefPtr<WebCore::CoordinatedGraphicsScene> m_scene;
WebCore::FloatRect m_lastSentVisibleRect;
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in 2013-02-07 19:58:36 UTC (rev 142160)
@@ -18,7 +18,7 @@
#
#if USE(COORDINATED_GRAPHICS)
-messages -> CoordinatedLayerTreeHostProxy LegacyReceiver {
+messages -> CoordinatedLayerTreeHostProxy {
SetCompositingLayerState(uint32_t id, WebCore::CoordinatedLayerInfo layerInfo)
SetCompositingLayerChildren(uint32_t id, Vector<uint32_t> children)
#if ENABLE(CSS_FILTERS)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -26,7 +26,9 @@
#include "config.h"
#include "DrawingAreaProxy.h"
+#include "DrawingAreaProxyMessages.h"
#include "WebPageProxy.h"
+#include "WebProcessProxy.h"
#if USE(COORDINATED_GRAPHICS)
#include "CoordinatedLayerTreeHostProxy.h"
@@ -41,10 +43,12 @@
, m_webPageProxy(webPageProxy)
, m_size(webPageProxy->viewSize())
{
+ m_webPageProxy->process()->addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy->pageID(), this);
}
DrawingAreaProxy::~DrawingAreaProxy()
{
+ m_webPageProxy->process()->removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID());
}
void DrawingAreaProxy::setSize(const IntSize& size, const IntSize& scrollOffset)
@@ -67,10 +71,6 @@
{
return IntRect(IntPoint::zero(), m_webPageProxy->viewSize());
}
-
-void DrawingAreaProxy::didReceiveCoordinatedLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&)
-{
-}
#endif
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -29,21 +29,13 @@
#include "BackingStore.h"
#include "DrawingAreaInfo.h"
+#include "MessageReceiver.h"
#include <WebCore/FloatPoint.h>
#include <WebCore/IntRect.h>
#include <WebCore/IntSize.h>
#include <stdint.h>
#include <wtf/Noncopyable.h>
-namespace CoreIPC {
- class Connection;
- class MessageDecoder;
-}
-
-namespace WebCore {
- class TransformationMatrix;
-}
-
namespace WebKit {
class LayerTreeContext;
@@ -51,7 +43,7 @@
class UpdateInfo;
class WebPageProxy;
-class DrawingAreaProxy {
+class DrawingAreaProxy : public CoreIPC::MessageReceiver {
WTF_MAKE_NONCOPYABLE(DrawingAreaProxy);
public:
@@ -59,8 +51,6 @@
DrawingAreaType type() const { return m_type; }
- void didReceiveDrawingAreaProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
-
virtual void deviceScaleFactorDidChange() = 0;
// FIXME: These should be pure virtual.
@@ -86,7 +76,6 @@
virtual WebCore::IntRect contentsRect() const;
CoordinatedLayerTreeHostProxy* coordinatedLayerTreeHostProxy() const { return m_coordinatedLayerTreeHostProxy.get(); }
virtual void setVisibleContentsRect(const WebCore::FloatRect& /* visibleContentsRect */, const WebCore::FloatPoint& /* trajectoryVector */) { }
- virtual void didReceiveCoordinatedLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
WebPageProxy* page() { return m_webPageProxy; }
#endif
@@ -106,6 +95,9 @@
private:
virtual void sizeDidChange() = 0;
+ // CoreIPC::MessageReceiver
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+
// CoreIPC message handlers.
// FIXME: These should be pure virtual.
virtual void update(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.messages.in (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.messages.in 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.messages.in 2013-02-07 19:58:36 UTC (rev 142160)
@@ -20,7 +20,7 @@
# 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.
-messages -> DrawingAreaProxy LegacyReceiver {
+messages -> DrawingAreaProxy {
Update(uint64_t stateID, WebKit::UpdateInfo updateInfo)
DidUpdateBackingStoreState(uint64_t backingStoreStateID, WebKit::UpdateInfo updateInfo, WebKit::LayerTreeContext context)
#if USE(ACCELERATED_COMPOSITING)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -370,18 +370,11 @@
}
#if USE(COORDINATED_GRAPHICS)
-void DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
-{
- if (m_coordinatedLayerTreeHostProxy)
- m_coordinatedLayerTreeHostProxy->didReceiveCoordinatedLayerTreeHostProxyMessage(connection, decoder);
-}
-
void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, const WebCore::FloatPoint& trajectoryVector)
{
if (m_coordinatedLayerTreeHostProxy)
m_coordinatedLayerTreeHostProxy->setVisibleContentsRect(visibleContentsRect, trajectoryVector);
}
-
#endif
void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -84,7 +84,6 @@
void updateAcceleratedCompositingMode(const LayerTreeContext&);
#if USE(COORDINATED_GRAPHICS)
virtual void setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, const WebCore::FloatPoint& trajectory) OVERRIDE;
- void didReceiveCoordinatedLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
#endif
#else
bool isInAcceleratedCompositingMode() const { return false; }
Modified: trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -43,6 +43,7 @@
: m_page(page)
, m_webView(0)
{
+ m_page->process()->addMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID(), this);
}
WebFullScreenManagerProxy::~WebFullScreenManagerProxy()
@@ -54,16 +55,6 @@
m_webView = webView;
}
-void WebFullScreenManagerProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
-{
- didReceiveWebFullScreenManagerProxyMessage(connection, decoder);
-}
-
-void WebFullScreenManagerProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder)
-{
- didReceiveSyncWebFullScreenManagerProxyMessage(connection, decoder, replyEncoder);
-}
-
void WebFullScreenManagerProxy::willEnterFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::WillEnterFullScreen(), m_page->pageID());
Modified: trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -28,15 +28,11 @@
#if ENABLE(FULLSCREEN_API)
-#include "Connection.h"
+#include "MessageReceiver.h"
#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
-namespace CoreIPC {
-class ArgumentDecoder;
-class Connection;
-}
-
namespace WebCore {
class IntRect;
}
@@ -64,7 +60,7 @@
class WebPageProxy;
class LayerTreeContext;
-class WebFullScreenManagerProxy : public RefCounted<WebFullScreenManagerProxy> {
+class WebFullScreenManagerProxy : public RefCounted<WebFullScreenManagerProxy>, public CoreIPC::MessageReceiver {
public:
static PassRefPtr<WebFullScreenManagerProxy> create(WebPageProxy*);
virtual ~WebFullScreenManagerProxy();
@@ -75,9 +71,6 @@
bool isFullScreen();
void close();
- void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
- void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
-
void willEnterFullScreen();
void didEnterFullScreen();
void willExitFullScreen();
@@ -94,11 +87,11 @@
void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame);
void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame);
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+ virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
+
WebPageProxy* m_page;
PlatformWebView* m_webView;
-
- void didReceiveWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
- void didReceiveSyncWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.messages.in (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.messages.in 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.messages.in 2013-02-07 19:58:36 UTC (rev 142160)
@@ -21,7 +21,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if ENABLE(FULLSCREEN_API)
-messages -> WebFullScreenManagerProxy LegacyReceiver {
+messages -> WebFullScreenManagerProxy {
SupportsFullScreen(bool withKeyboard) -> (bool supportsFullScreen)
EnterFullScreen()
ExitFullScreen()
Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -32,6 +32,7 @@
#include "WebFramePolicyListenerProxy.h"
#include "WebFrameProxy.h"
#include "WebInspectorMessages.h"
+#include "WebInspectorProxyMessages.h"
#include "WebPageCreationParameters.h"
#include "WebPageGroup.h"
#include "WebPageProxy.h"
@@ -92,6 +93,7 @@
, m_remoteInspectionPageId(0)
#endif
{
+ m_page->process()->addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID(), this);
}
WebInspectorProxy::~WebInspectorProxy()
@@ -105,6 +107,8 @@
WebInspectorServer::shared().unregisterPage(m_remoteInspectionPageId);
#endif
+ m_page->process()->removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID());
+
m_page->close();
didClose();
Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -30,7 +30,7 @@
#if ENABLE(INSPECTOR)
#include "APIObject.h"
-#include "Connection.h"
+#include "MessageReceiver.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -62,7 +62,7 @@
class WebPageProxy;
struct WebPageCreationParameters;
-class WebInspectorProxy : public APIObject {
+class WebInspectorProxy : public APIObject, public CoreIPC::MessageReceiver {
public:
static const Type APIType = TypeInspector;
@@ -116,12 +116,6 @@
bool isProfilingPage() const { return m_isProfilingPage; }
void togglePageProfiling();
-#if ENABLE(INSPECTOR)
- // Implemented in generated WebInspectorProxyMessageReceiver.cpp
- void didReceiveWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
- void didReceiveSyncWebInspectorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
-#endif
-
static bool isInspectorPage(WebPageProxy*);
// Implemented the platform WebInspectorProxy file
@@ -141,6 +135,10 @@
virtual Type type() const { return APIType; }
+ // CoreIPC::MessageReceiver
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+ virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
+
WebPageProxy* platformCreateInspectorPage();
void platformOpen();
void platformDidClose();
Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.messages.in 2013-02-07 19:58:36 UTC (rev 142160)
@@ -22,7 +22,7 @@
#if ENABLE(INSPECTOR)
-messages -> WebInspectorProxy LegacyReceiver {
+messages -> WebInspectorProxy {
CreateInspectorPage() -> (uint64_t inspectorPageID, WebKit::WebPageCreationParameters inspectorPageParameters)
DidLoadInspectorPage()
DidClose()
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -72,6 +72,7 @@
#include "WebPageGroup.h"
#include "WebPageGroupData.h"
#include "WebPageMessages.h"
+#include "WebPageProxyMessages.h"
#include "WebPopupItem.h"
#include "WebPopupMenuProxy.h"
#include "WebPreferences.h"
@@ -250,9 +251,17 @@
m_pageGroup->addPage(this);
+#if ENABLE(INSPECTOR)
+ m_inspector = WebInspectorProxy::create(this);
+#endif
+#if ENABLE(FULLSCREEN_API)
+ m_fullScreenManager = WebFullScreenManagerProxy::create(this);
+#endif
#if ENABLE(VIBRATION)
m_vibration = WebVibrationProxy::create(this);
#endif
+
+ m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, this);
}
WebPageProxy::~WebPageProxy()
@@ -385,11 +394,19 @@
else
m_process = m_process->context()->createNewWebProcessRespectingProcessCountLimit();
m_process->addExistingWebPage(this, m_pageID);
+ m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, this);
initializeWebPage();
m_pageClient->didRelaunchProcess();
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
+
+#if ENABLE(INSPECTOR)
+ m_inspector = WebInspectorProxy::create(this);
+#endif
+#if ENABLE(FULLSCREEN_API)
+ m_fullScreenManager = WebFullScreenManagerProxy::create(this);
+#endif
}
void WebPageProxy::reattachToWebProcessWithItem(WebBackForwardListItem* item)
@@ -526,6 +543,7 @@
m_process->send(Messages::WebPage::Close(), m_pageID);
m_process->removeWebPage(m_pageID);
+ m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
}
bool WebPageProxy::tryClose()
@@ -1933,59 +1951,6 @@
m_process->send(Messages::WebPage::PreferencesDidChange(pageGroup()->preferences()->store()), m_pageID, m_isPerformingDOMPrintOperation ? CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply : 0);
}
-void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
-{
- if (decoder.messageReceiverName() == Messages::DrawingAreaProxy::messageReceiverName()) {
- m_drawingArea->didReceiveDrawingAreaProxyMessage(connection, decoder);
- return;
- }
-
-#if USE(COORDINATED_GRAPHICS)
- if (decoder.messageReceiverName() == Messages::CoordinatedLayerTreeHostProxy::messageReceiverName()) {
- m_drawingArea->didReceiveCoordinatedLayerTreeHostProxyMessage(connection, decoder);
- return;
- }
-#endif
-
-#if ENABLE(INSPECTOR)
- if (decoder.messageReceiverName() == Messages::WebInspectorProxy::messageReceiverName()) {
- if (WebInspectorProxy* inspector = this->inspector())
- inspector->didReceiveWebInspectorProxyMessage(connection, decoder);
- return;
- }
-#endif
-
-#if ENABLE(FULLSCREEN_API)
- if (decoder.messageReceiverName() == Messages::WebFullScreenManagerProxy::messageReceiverName()) {
- fullScreenManager()->didReceiveMessage(connection, decoder);
- return;
- }
-#endif
-
- didReceiveWebPageProxyMessage(connection, decoder);
-}
-
-void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder)
-{
-#if ENABLE(INSPECTOR)
- if (decoder.messageReceiverName() == Messages::WebInspectorProxy::messageReceiverName()) {
- if (WebInspectorProxy* inspector = this->inspector())
- inspector->didReceiveSyncWebInspectorProxyMessage(connection, decoder, replyEncoder);
- return;
- }
-#endif
-
-#if ENABLE(FULLSCREEN_API)
- if (decoder.messageReceiverName() == Messages::WebFullScreenManagerProxy::messageReceiverName()) {
- fullScreenManager()->didReceiveSyncMessage(connection, decoder, replyEncoder);
- return;
- }
-#endif
-
- // FIXME: Do something with reply.
- didReceiveSyncWebPageProxyMessage(connection, decoder, replyEncoder);
-}
-
void WebPageProxy::didCreateMainFrame(uint64_t frameID)
{
MESSAGE_CHECK(!m_mainFrame);
@@ -2846,8 +2811,6 @@
{
if (isClosed() || !isValid())
return 0;
- if (!m_inspector)
- m_inspector = WebInspectorProxy::create(this);
return m_inspector.get();
}
@@ -2856,8 +2819,6 @@
#if ENABLE(FULLSCREEN_API)
WebFullScreenManagerProxy* WebPageProxy::fullScreenManager()
{
- if (!m_fullScreenManager)
- m_fullScreenManager = WebFullScreenManagerProxy::create(this);
return m_fullScreenManager.get();
}
#endif
@@ -3612,17 +3573,13 @@
m_drawingArea = nullptr;
#if ENABLE(INSPECTOR)
- if (m_inspector) {
- m_inspector->invalidate();
- m_inspector = nullptr;
- }
+ m_inspector->invalidate();
+ m_inspector = nullptr;
#endif
#if ENABLE(FULLSCREEN_API)
- if (m_fullScreenManager) {
- m_fullScreenManager->invalidate();
- m_fullScreenManager = nullptr;
- }
+ m_fullScreenManager->invalidate();
+ m_fullScreenManager = nullptr;
#endif
#if ENABLE(VIBRATION)
@@ -3719,6 +3676,8 @@
dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
m_pageClient->dismissDictionaryLookupPanel();
#endif
+
+ m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
}
WebPageCreationParameters WebPageProxy::creationParameters() const
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2013-02-07 19:58:36 UTC (rev 142160)
@@ -32,12 +32,6 @@
#include "DrawingAreaProxy.h"
#include "EditorState.h"
#include "GeolocationPermissionRequestManagerProxy.h"
-#if ENABLE(TOUCH_EVENTS)
-#include "NativeWebTouchEvent.h"
-#endif
-#if PLATFORM(QT)
-#include "QtNetworkRequestData.h"
-#endif
#include "LayerTreeContext.h"
#include "NotificationPermissionRequestManagerProxy.h"
#include "PlatformProcessIdentifier.h"
@@ -81,10 +75,18 @@
#include <WebCore/DragSession.h>
#endif
+#if ENABLE(TOUCH_EVENTS)
+#include "NativeWebTouchEvent.h"
+#endif
+
#if PLATFORM(EFL)
#include <Evas.h>
#endif
+#if PLATFORM(QT)
+#include "QtNetworkRequestData.h"
+#endif
+
namespace CoreIPC {
class ArgumentDecoder;
class Connection;
@@ -230,7 +232,8 @@
#if ENABLE(INPUT_TYPE_COLOR)
, public WebColorChooserProxy::Client
#endif
- , public WebPopupMenuProxy::Client {
+ , public WebPopupMenuProxy::Client
+ , public CoreIPC::MessageReceiver {
public:
static const Type APIType = TypePage;
@@ -583,9 +586,6 @@
#endif
#endif
- void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
- void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
-
void processDidBecomeUnresponsive();
void interactionOccurredWhileProcessUnresponsive();
void processDidBecomeResponsive();
@@ -749,6 +749,10 @@
virtual Type type() const { return APIType; }
+ // CoreIPC::MessageReceiver
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+ virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
+
// WebPopupMenuProxy::Client
virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2013-02-07 19:58:36 UTC (rev 142160)
@@ -20,7 +20,7 @@
# 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.
-messages -> WebPageProxy LegacyReceiver {
+messages -> WebPageProxy {
# UI messages
CreateNewPage(WebCore::ResourceRequest request, WebCore::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
ShowPage()
Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2013-02-07 19:58:36 UTC (rev 142160)
@@ -401,15 +401,7 @@
return;
}
- uint64_t pageID = decoder.destinationID();
- if (!pageID)
- return;
-
- WebPageProxy* pageProxy = webPage(pageID);
- if (!pageProxy)
- return;
-
- pageProxy->didReceiveMessage(connection, decoder);
+ // FIXME: Add unhandled message logging.
}
void WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder)
@@ -425,15 +417,7 @@
return;
}
- uint64_t pageID = decoder.destinationID();
- if (!pageID)
- return;
-
- WebPageProxy* pageProxy = webPage(pageID);
- if (!pageProxy)
- return;
-
- pageProxy->didReceiveSyncMessage(connection, decoder, replyEncoder);
+ // FIXME: Add unhandled message logging.
}
void WebProcessProxy::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, OwnPtr<CoreIPC::MessageDecoder>& decoder)
Modified: trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm (142159 => 142160)
--- trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2013-02-07 19:48:39 UTC (rev 142159)
+++ trunk/Source/WebKit2/UIProcess/mac/WebFullScreenManagerProxyMac.mm 2013-02-07 19:58:36 UTC (rev 142160)
@@ -31,6 +31,9 @@
#import "LayerTreeContext.h"
#import "WKFullScreenWindowController.h"
#import "WKViewInternal.h"
+#import "WebFullScreenManagerProxyMessages.h"
+#import "WebPageProxy.h"
+#import "WebProcessProxy.h"
#import <WebCore/IntRect.h>
using namespace WebCore;
@@ -39,6 +42,8 @@
void WebFullScreenManagerProxy::invalidate()
{
+ m_page->process()->removeMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID());
+
if (!m_webView)
return;