Commit 8029245b authored by weinig@apple.com's avatar weinig@apple.com

[CTTE] The WebPageProxy's WebProcessProxy is never null so it should be stored in a Ref

https://bugs.webkit.org/show_bug.cgi?id=125047

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Downloads/DownloadProxy.cpp:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxyMap.cpp:
* UIProcess/Downloads/DownloadProxyMap.h:
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:
* UIProcess/WebEditCommandProxy.cpp:
* UIProcess/WebFrameProxy.cpp:
* UIProcess/WebFullScreenManagerProxy.cpp:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebPageGroup.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
* UIProcess/WebProcessProxy.h:
* UIProcess/cf/WebPageProxyCF.cpp:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
* UIProcess/mac/RemoteLayerTreeHost.mm:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6e207f09
2013-12-01 Sam Weinig <sam@webkit.org>
[CTTE] The WebPageProxy's WebProcessProxy is never null so it should be stored in a Ref
https://bugs.webkit.org/show_bug.cgi?id=125047
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Downloads/DownloadProxy.cpp:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxyMap.cpp:
* UIProcess/Downloads/DownloadProxyMap.h:
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.cpp:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:
* UIProcess/WebEditCommandProxy.cpp:
* UIProcess/WebFrameProxy.cpp:
* UIProcess/WebFullScreenManagerProxy.cpp:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebPageGroup.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
* UIProcess/WebProcessProxy.h:
* UIProcess/cf/WebPageProxyCF.cpp:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
* UIProcess/mac/RemoteLayerTreeHost.mm:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
2013-12-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][CoordinatedGraphics] Clear m_contentsSize when new contents are loaded
......
......@@ -55,7 +55,7 @@ WKTypeID WKPageGetTypeID()
WKContextRef WKPageGetContext(WKPageRef pageRef)
{
return toAPI(toImpl(pageRef)->process()->context());
return toAPI(&toImpl(pageRef)->process().context());
}
WKPageGroupRef WKPageGetPageGroup(WKPageRef pageRef)
......
......@@ -44,5 +44,5 @@ bool WKPageIsURLKnownHSTSHost(WKPageRef page, WKURLRef url)
WebPageProxy* webPageProxy = toImpl(page);
bool privateBrowsingEnabled = webPageProxy->pageGroup().preferences()->privateBrowsingEnabled();
return webPageProxy->process()->context()->isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
return webPageProxy->process().context().isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
}
......@@ -113,10 +113,7 @@ static NSString * const frameErrorKey = @"WKBrowsingContextFrameErrorKey";
- (WKProcessGroup *)processGroup
{
WebContext* context = _page->process()->context();
if (!context)
return nil;
return wrapper(*context);
return wrapper(_page->process().context());
}
- (WKBrowsingContextGroup *)browsingContextGroup
......
......@@ -916,7 +916,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
bool spellCheckingEnabled = !TextChecker::state().isContinuousSpellCheckingEnabled;
TextChecker::setContinuousSpellCheckingEnabled(spellCheckingEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (BOOL)isGrammarCheckingEnabled
......@@ -930,7 +930,7 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return;
TextChecker::setGrammarCheckingEnabled(flag);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (IBAction)toggleGrammarChecking:(id)sender
......@@ -938,14 +938,14 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
bool grammarCheckingEnabled = !TextChecker::state().isGrammarCheckingEnabled;
TextChecker::setGrammarCheckingEnabled(grammarCheckingEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (IBAction)toggleAutomaticSpellingCorrection:(id)sender
{
TextChecker::setAutomaticSpellingCorrectionEnabled(!TextChecker::state().isAutomaticSpellingCorrectionEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)orderFrontSubstitutionsPanel:(id)sender
......@@ -980,13 +980,13 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return;
TextChecker::setAutomaticQuoteSubstitutionEnabled(flag);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)toggleAutomaticQuoteSubstitution:(id)sender
{
TextChecker::setAutomaticQuoteSubstitutionEnabled(!TextChecker::state().isAutomaticQuoteSubstitutionEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (BOOL)isAutomaticDashSubstitutionEnabled
......@@ -1000,13 +1000,13 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return;
TextChecker::setAutomaticDashSubstitutionEnabled(flag);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)toggleAutomaticDashSubstitution:(id)sender
{
TextChecker::setAutomaticDashSubstitutionEnabled(!TextChecker::state().isAutomaticDashSubstitutionEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (BOOL)isAutomaticLinkDetectionEnabled
......@@ -1020,13 +1020,13 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return;
TextChecker::setAutomaticLinkDetectionEnabled(flag);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)toggleAutomaticLinkDetection:(id)sender
{
TextChecker::setAutomaticLinkDetectionEnabled(!TextChecker::state().isAutomaticLinkDetectionEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (BOOL)isAutomaticTextReplacementEnabled
......@@ -1040,13 +1040,13 @@ static void speakString(WKStringRef string, WKErrorRef error, void*)
return;
TextChecker::setAutomaticTextReplacementEnabled(flag);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)toggleAutomaticTextReplacement:(id)sender
{
TextChecker::setAutomaticTextReplacementEnabled(!TextChecker::state().isAutomaticTextReplacementEnabled);
_data->_page->process()->updateTextCheckerState();
_data->_page->process().updateTextCheckerState();
}
- (void)uppercaseWord:(id)sender
......@@ -1820,7 +1820,7 @@ static void createSandboxExtensionsForFileUpload(NSPasteboard *pasteboard, Sandb
SandboxExtension::Handle sandboxExtensionHandle;
bool createdExtension = maybeCreateSandboxExtensionFromPasteboard([draggingInfo draggingPasteboard], sandboxExtensionHandle);
if (createdExtension)
_data->_page->process()->willAcquireUniversalFileReadSandboxExtension();
_data->_page->process().willAcquireUniversalFileReadSandboxExtension();
SandboxExtension::HandleArray sandboxExtensionForUpload;
createSandboxExtensionsForFileUpload([draggingInfo draggingPasteboard], sandboxExtensionForUpload);
......@@ -2095,8 +2095,8 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
// needs to be updated with the pid of the remote process. If the process is going
// away, that information is not present in WebProcess
pid_t pid = 0;
if (registerProcess && _data->_page->process())
pid = _data->_page->process()->processIdentifier();
if (registerProcess)
pid = _data->_page->process().processIdentifier();
else if (!registerProcess) {
pid = WKAXRemoteProcessIdentifier(_data->_remoteAccessibilityChild.get());
_data->_remoteAccessibilityChild = nil;
......
......@@ -50,14 +50,14 @@ static uint64_t generateDownloadID()
return ++uniqueDownloadID;
}
PassRefPtr<DownloadProxy> DownloadProxy::create(DownloadProxyMap& downloadProxyMap, WebContext* webContext)
PassRefPtr<DownloadProxy> DownloadProxy::create(DownloadProxyMap& downloadProxyMap, WebContext& webContext)
{
return adoptRef(new DownloadProxy(downloadProxyMap, webContext));
}
DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebContext* webContext)
DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebContext& webContext)
: m_downloadProxyMap(downloadProxyMap)
, m_webContext(webContext)
, m_webContext(&webContext)
, m_downloadID(generateDownloadID())
{
}
......
......@@ -48,7 +48,7 @@ class WebPageProxy;
class DownloadProxy : public API::TypedObject<API::Object::Type::Download>, public CoreIPC::MessageReceiver {
public:
static PassRefPtr<DownloadProxy> create(DownloadProxyMap&, WebContext*);
static PassRefPtr<DownloadProxy> create(DownloadProxyMap&, WebContext&);
~DownloadProxy();
uint64_t downloadID() const { return m_downloadID; }
......@@ -64,7 +64,7 @@ public:
void didReceiveSyncDownloadProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, std::unique_ptr<CoreIPC::MessageEncoder>&);
private:
explicit DownloadProxy(DownloadProxyMap&, WebContext*);
explicit DownloadProxy(DownloadProxyMap&, WebContext&);
// CoreIPC::MessageReceiver
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
......
......@@ -44,7 +44,7 @@ DownloadProxyMap::~DownloadProxyMap()
ASSERT(m_downloads.isEmpty());
}
DownloadProxy* DownloadProxyMap::createDownloadProxy(WebContext* webContext)
DownloadProxy* DownloadProxyMap::createDownloadProxy(WebContext& webContext)
{
RefPtr<DownloadProxy> downloadProxy = DownloadProxy::create(*this, webContext);
m_downloads.set(downloadProxy->downloadID(), downloadProxy);
......
......@@ -43,7 +43,7 @@ public:
explicit DownloadProxyMap(ChildProcessProxy*);
~DownloadProxyMap();
DownloadProxy* createDownloadProxy(WebContext*);
DownloadProxy* createDownloadProxy(WebContext&);
void downloadFinished(DownloadProxy*);
bool isEmpty() const { return m_downloads.isEmpty(); }
......
......@@ -41,12 +41,12 @@ DrawingAreaProxy::DrawingAreaProxy(DrawingAreaType type, WebPageProxy* webPagePr
, m_webPageProxy(webPageProxy)
, m_size(webPageProxy->viewSize())
{
m_webPageProxy->process()->addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy->pageID(), this);
m_webPageProxy->process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy->pageID(), this);
}
DrawingAreaProxy::~DrawingAreaProxy()
{
m_webPageProxy->process()->removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID());
m_webPageProxy->process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID());
}
void DrawingAreaProxy::setSize(const IntSize& size, const IntSize& layerPosition, const IntSize& scrollOffset)
......
......@@ -62,7 +62,7 @@ void GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDe
return;
#if ENABLE(GEOLOCATION)
m_page.process()->send(Messages::WebPage::DidReceiveGeolocationPermissionDecision(geolocationID, allowed), m_page.pageID());
m_page.process().send(Messages::WebPage::DidReceiveGeolocationPermissionDecision(geolocationID, allowed), m_page.pageID());
#else
UNUSED_PARAM(allowed);
#endif
......
......@@ -47,12 +47,12 @@ using namespace WebCore;
namespace WebKit {
PassRefPtr<NetworkProcessProxy> NetworkProcessProxy::create(WebContext* webContext)
PassRefPtr<NetworkProcessProxy> NetworkProcessProxy::create(WebContext& webContext)
{
return adoptRef(new NetworkProcessProxy(webContext));
}
NetworkProcessProxy::NetworkProcessProxy(WebContext* webContext)
NetworkProcessProxy::NetworkProcessProxy(WebContext& webContext)
: m_webContext(webContext)
, m_numPendingConnectionRequests(0)
#if ENABLE(CUSTOM_PROTOCOLS)
......@@ -117,7 +117,7 @@ void NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch()
}
// Tell the network process manager to forget about this network process proxy. This may cause us to be deleted.
m_webContext->networkProcessCrashed(this);
m_webContext.networkProcessCrashed(this);
}
void NetworkProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
......@@ -125,7 +125,7 @@ void NetworkProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, Cor
if (dispatchMessage(connection, decoder))
return;
if (m_webContext->dispatchMessage(connection, decoder))
if (m_webContext.dispatchMessage(connection, decoder))
return;
didReceiveNetworkProcessProxyMessage(connection, decoder);
......@@ -190,7 +190,7 @@ void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* launcher, CoreIPC:
m_numPendingConnectionRequests = 0;
#if PLATFORM(MAC)
if (m_webContext->canEnableProcessSuppressionForNetworkProcess())
if (m_webContext.canEnableProcessSuppressionForNetworkProcess())
setProcessSuppressionEnabled(true);
#endif
}
......
......@@ -50,7 +50,7 @@ struct NetworkProcessCreationParameters;
class NetworkProcessProxy : public ChildProcessProxy {
public:
static PassRefPtr<NetworkProcessProxy> create(WebContext*);
static PassRefPtr<NetworkProcessProxy> create(WebContext&);
~NetworkProcessProxy();
void getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>);
......@@ -62,7 +62,7 @@ public:
#endif
private:
NetworkProcessProxy(WebContext*);
NetworkProcessProxy(WebContext&);
// ChildProcessProxy
virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE;
......@@ -86,7 +86,7 @@ private:
// ProcessLauncher::Client
virtual void didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier);
WebContext* m_webContext;
WebContext& m_webContext;
unsigned m_numPendingConnectionRequests;
Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
......
......@@ -62,7 +62,7 @@ void NotificationPermissionRequestManagerProxy::didReceiveNotificationPermission
if (!request)
return;
m_page.process()->send(Messages::WebPage::DidReceiveNotificationPermissionDecision(notificationID, allow), m_page.pageID());
m_page.process().send(Messages::WebPage::DidReceiveNotificationPermissionDecision(notificationID, allow), m_page.pageID());
}
} // namespace WebKit
......@@ -183,7 +183,7 @@ void WebNotificationManagerProxy::providerDidShowNotification(uint64_t globalNot
return;
uint64_t pageNotificationID = it->value.second;
webPage->process()->send(Messages::WebNotificationManager::DidShowNotification(pageNotificationID), 0);
webPage->process().send(Messages::WebNotificationManager::DidShowNotification(pageNotificationID), 0);
}
void WebNotificationManagerProxy::providerDidClickNotification(uint64_t globalNotificationID)
......@@ -198,7 +198,7 @@ void WebNotificationManagerProxy::providerDidClickNotification(uint64_t globalNo
return;
uint64_t pageNotificationID = it->value.second;
webPage->process()->send(Messages::WebNotificationManager::DidClickNotification(pageNotificationID), 0);
webPage->process().send(Messages::WebNotificationManager::DidClickNotification(pageNotificationID), 0);
}
......@@ -229,7 +229,7 @@ void WebNotificationManagerProxy::providerDidCloseNotifications(API::Array* glob
}
for (auto it = pageNotificationIDs.begin(), end = pageNotificationIDs.end(); it != end; ++it)
it->key->process()->send(Messages::WebNotificationManager::DidCloseNotifications(it->value), 0);
it->key->process().send(Messages::WebNotificationManager::DidCloseNotifications(it->value), 0);
}
void WebNotificationManagerProxy::providerDidUpdateNotificationPolicy(const WebSecurityOrigin* origin, bool allowed)
......
......@@ -370,7 +370,7 @@ void WebContext::ensureNetworkProcess()
if (m_networkProcess)
return;
m_networkProcess = NetworkProcessProxy::create(this);
m_networkProcess = NetworkProcessProxy::create(*this);
NetworkProcessCreationParameters parameters;
......@@ -506,22 +506,22 @@ void WebContext::processDidCachePage(WebProcessProxy* process)
m_processWithPageCache = process;
}
WebProcessProxy* WebContext::ensureSharedWebProcess()
WebProcessProxy& WebContext::ensureSharedWebProcess()
{
ASSERT(m_processModel == ProcessModelSharedSecondaryProcess);
if (m_processes.isEmpty())
createNewWebProcess();
return m_processes[0].get();
return *m_processes[0];
}
WebProcessProxy* WebContext::createNewWebProcess()
WebProcessProxy& WebContext::createNewWebProcess()
{
#if ENABLE(NETWORK_PROCESS)
if (m_usesNetworkProcess)
ensureNetworkProcess();
#endif
RefPtr<WebProcessProxy> process = WebProcessProxy::create(this);
RefPtr<WebProcessProxy> process = WebProcessProxy::create(*this);
WebProcessCreationParameters parameters;
......@@ -615,7 +615,7 @@ WebProcessProxy* WebContext::createNewWebProcess()
} else
ASSERT(m_messagesToInjectedBundlePostedToEmptyContext.isEmpty());
return process.get();
return *process;
}
void WebContext::warmInitialProcess()
......@@ -723,13 +723,13 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
m_processes.remove(m_processes.find(process));
}
WebProcessProxy* WebContext::createNewWebProcessRespectingProcessCountLimit()
WebProcessProxy& WebContext::createNewWebProcessRespectingProcessCountLimit()
{
if (m_processes.size() < m_webProcessCountLimit)
return createNewWebProcess();
// Choose a process with fewest pages, to achieve flat distribution.
WebProcessProxy* result = 0;
WebProcessProxy* result = nullptr;
unsigned fewestPagesSeen = UINT_MAX;
for (unsigned i = 0; i < m_processes.size(); ++i) {
if (fewestPagesSeen > m_processes[i]->pages().size()) {
......@@ -737,23 +737,23 @@ WebProcessProxy* WebContext::createNewWebProcessRespectingProcessCountLimit()
fewestPagesSeen = m_processes[i]->pages().size();
}
}
return result;
return *result;
}
PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
{
RefPtr<WebProcessProxy> process;
if (m_processModel == ProcessModelSharedSecondaryProcess) {
process = ensureSharedWebProcess();
process = &ensureSharedWebProcess();
} else {
if (m_haveInitialEmptyProcess) {
process = m_processes.last();
m_haveInitialEmptyProcess = false;
} else if (relatedPage) {
// Sharing processes, e.g. when creating the page via window.open().
process = relatedPage->process();
process = &relatedPage->process();
} else
process = createNewWebProcessRespectingProcessCountLimit();
process = &createNewWebProcessRespectingProcessCountLimit();
}
return process->createWebPage(pageClient, pageGroup ? *pageGroup : m_defaultPageGroup.get());
......@@ -916,7 +916,7 @@ DownloadProxy* WebContext::createDownloadProxy()
return m_networkProcess->createDownloadProxy();
#endif
return ensureSharedWebProcess()->createDownloadProxy();
return ensureSharedWebProcess().createDownloadProxy();
}
void WebContext::addMessageReceiver(CoreIPC::StringReference messageReceiverName, CoreIPC::MessageReceiver* messageReceiver)
......
......@@ -242,8 +242,8 @@ public:
void allowSpecificHTTPSCertificateForHost(const WebCertificateInfo*, const String& host);
WebProcessProxy* ensureSharedWebProcess();
WebProcessProxy* createNewWebProcessRespectingProcessCountLimit(); // Will return an existing one if limit is met.
WebProcessProxy& ensureSharedWebProcess();
WebProcessProxy& createNewWebProcessRespectingProcessCountLimit(); // Will return an existing one if limit is met.
void warmInitialProcess();
bool shouldTerminate(WebProcessProxy*);
......@@ -321,7 +321,7 @@ private:
void platformInitializeWebProcess(WebProcessCreationParameters&);
void platformInvalidateContext();
WebProcessProxy* createNewWebProcess();
WebProcessProxy& createNewWebProcess();
void requestWebContentStatistics(StatisticsRequest*);
void requestNetworkingStatistics(StatisticsRequest*);
......
......@@ -55,7 +55,7 @@ void WebEditCommandProxy::unapply()
if (!m_page || !m_page->isValid())
return;
m_page->process()->send(Messages::WebPage::UnapplyEditCommand(m_commandID), m_page->pageID(), CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
m_page->process().send(Messages::WebPage::UnapplyEditCommand(m_commandID), m_page->pageID(), CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
m_page->registerEditCommand(this, WebPageProxy::Redo);
}
......@@ -64,7 +64,7 @@ void WebEditCommandProxy::reapply()
if (!m_page || !m_page->isValid())
return;
m_page->process()->send(Messages::WebPage::ReapplyEditCommand(m_commandID), m_page->pageID(), CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
m_page->process().send(Messages::WebPage::ReapplyEditCommand(m_commandID), m_page->pageID(), CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply);
m_page->registerEditCommand(this, WebPageProxy::Undo);
}
......
......@@ -78,7 +78,7 @@ void WebFrameProxy::loadURL(const String& url)
if (!m_page)
return;
m_page->process()->send(Messages::WebPage::LoadURLInFrame(url, m_frameID), m_page->pageID());
m_page->process().send(Messages::WebPage::LoadURLInFrame(url, m_frameID), m_page->pageID());
}
void WebFrameProxy::stopLoading() const
......@@ -89,7 +89,7 @@ void WebFrameProxy::stopLoading() const
if (!m_page->isValid())
return;
m_page->process()->send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID());
m_page->process().send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID());
}
bool WebFrameProxy::canProvideSource() const
......
......@@ -46,7 +46,7 @@ WebFullScreenManagerProxy::WebFullScreenManagerProxy(WebPageProxy* page)
, m_hasRequestedFullScreen(false)
#endif
{
m_page->process()->addMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID(), this);
m_page->process().addMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID(), this);
}
WebFullScreenManagerProxy::~WebFullScreenManagerProxy()
......@@ -60,32 +60,32 @@ void WebFullScreenManagerProxy::setWebView(PlatformWebView* webView)
void WebFullScreenManagerProxy::willEnterFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::WillEnterFullScreen(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::WillEnterFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::didEnterFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::DidEnterFullScreen(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::DidEnterFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::willExitFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::WillExitFullScreen(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::WillExitFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::didExitFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::DidExitFullScreen(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::DidExitFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::setAnimatingFullScreen(bool animating)
{
m_page->process()->send(Messages::WebFullScreenManager::SetAnimatingFullScreen(animating), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::SetAnimatingFullScreen(animating), m_page->pageID());
}
void WebFullScreenManagerProxy::requestExitFullScreen()
{
m_page->process()->send(Messages::WebFullScreenManager::RequestExitFullScreen(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::RequestExitFullScreen(), m_page->pageID());
}
void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supports)
......@@ -95,12 +95,12 @@ void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supp
void WebFullScreenManagerProxy::saveScrollPosition()
{
m_page->process()->send(Messages::WebFullScreenManager::SaveScrollPosition(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::SaveScrollPosition(), m_page->pageID());
}
void WebFullScreenManagerProxy::restoreScrollPosition()
{
m_page->process()->send(Messages::WebFullScreenManager::RestoreScrollPosition(), m_page->pageID());
m_page->process().send(Messages::WebFullScreenManager::RestoreScrollPosition(), m_page->pageID());
}
} // namespace WebKit
......
......@@ -140,7 +140,7 @@ WebInspectorProxy::WebInspectorProxy(WebPageProxy* page)
#endif
{
m_level = WebInspectorPageGroups::shared().inspectorLevel(m_page->pageGroup());
m_page->process()->addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID(), this);
m_page->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID(), this);
}
WebInspectorProxy::~WebInspectorProxy()
......@@ -159,7 +159,7 @@ void WebInspectorProxy::invalidate()
WebInspectorServer::shared().unregisterPage(m_remoteInspectionPageId);
#endif
m_page->process()->removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_page->pageID());
m_page->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName