blob: 537266792fa37f104c366446c66037fc9e8d92e0 [file] [log] [blame]
weinig@apple.comd773bc12010-04-09 00:49:12 +00001/*
2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#ifndef WebProcess_h
27#define WebProcess_h
28
weinig@apple.com47a15042010-10-04 17:15:41 +000029#include "CacheModel.h"
andersca@apple.com059f5fb2010-11-05 22:55:41 +000030#include "ChildProcess.h"
andersca@apple.coma4c481e2012-12-13 20:53:03 +000031#include "DownloadManager.h"
weinig@apple.com31cb2412010-04-09 20:49:01 +000032#include "DrawingArea.h"
jberlin@webkit.orga163d3e2011-12-13 00:52:46 +000033#include "EventDispatcher.h"
andersca@apple.combb2611b2012-10-22 22:09:56 +000034#include "MessageReceiverMap.h"
kling@webkit.org89ef6682012-05-11 19:49:28 +000035#include "PluginInfoStore.h"
jberlin@webkit.org9a24b922011-03-10 21:17:46 +000036#include "ResourceCachesToClear.h"
slewis@apple.comb211c4b2011-01-08 02:24:40 +000037#include "SandboxExtension.h"
andersca@apple.com741ac222010-08-06 00:00:45 +000038#include "SharedMemory.h"
andersca@apple.com190ba932011-01-04 22:41:52 +000039#include "TextCheckerState.h"
andersca@apple.com741ac222010-08-06 00:00:45 +000040#include "VisitedLinkTable.h"
weinig@apple.com5e61b0c2011-12-05 18:41:53 +000041#include "WebConnectionToUIProcess.h"
weinig@apple.com4201e962011-01-10 19:20:15 +000042#include "WebGeolocationManager.h"
beidson@apple.com3f10cc62011-03-16 02:15:52 +000043#include "WebIconDatabaseProxy.h"
weinig@apple.com40a04ca2010-12-01 22:00:01 +000044#include "WebPageGroupProxy.h"
beidson@apple.com4a633ad2010-08-02 21:10:52 +000045#include <WebCore/LinkHash.h>
barraclough@apple.comd218c2d2010-08-10 00:38:14 +000046#include <wtf/Forward.h>
weinig@apple.comd773bc12010-04-09 00:49:12 +000047#include <wtf/HashMap.h>
andersca@apple.com481efa32010-12-09 18:37:30 +000048#include <wtf/HashSet.h>
weinig@apple.comd773bc12010-04-09 00:49:12 +000049
carlosgc@webkit.org5d9808b2012-04-27 07:13:40 +000050#if USE(SOUP)
51#include "WebSoupRequestManager.h"
52#endif
53
jocelyn.turcotte@nokia.com36e9e692010-12-10 03:36:23 +000054#if PLATFORM(QT)
hausmann@webkit.orgfc0c1c62012-07-24 11:33:43 +000055QT_BEGIN_NAMESPACE
jocelyn.turcotte@nokia.com36e9e692010-12-10 03:36:23 +000056class QNetworkAccessManager;
hausmann@webkit.orgfc0c1c62012-07-24 11:33:43 +000057QT_END_NAMESPACE
jocelyn.turcotte@nokia.com36e9e692010-12-10 03:36:23 +000058#endif
59
kling@webkit.orgdf242ce2012-04-23 22:52:13 +000060#if PLATFORM(MAC)
61#include <dispatch/dispatch.h>
62#endif
63
commit-queue@webkit.org3c260882012-07-03 23:31:49 +000064#if ENABLE(BATTERY_STATUS)
65#include "WebBatteryManager.h"
66#endif
67
commit-queue@webkit.orga87fcb42012-07-06 19:12:12 +000068#if ENABLE(NETWORK_INFO)
69#include "WebNetworkInfoManager.h"
70#endif
71
jonlee@apple.comed78cdb2012-03-14 23:41:04 +000072#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
jonlee@apple.com6c095452011-11-29 01:08:35 +000073#include "WebNotificationManager.h"
74#endif
75
beidson@apple.com33785562012-10-25 17:16:38 +000076#if ENABLE(NETWORK_PROCESS)
77#include "WebResourceLoadScheduler.h"
78#endif
79
andersca@apple.com70c2c202011-05-03 00:53:03 +000080#if ENABLE(PLUGIN_PROCESS)
81#include "PluginProcessConnectionManager.h"
82#endif
83
weinig@apple.comd773bc12010-04-09 00:49:12 +000084namespace WebCore {
85 class IntSize;
weinig@apple.com17cf9952010-08-28 02:16:40 +000086 class PageGroup;
commit-queue@webkit.org6ff31532012-08-15 13:03:19 +000087#if ENABLE(WEB_INTENTS)
88 class PlatformMessagePortChannel;
89#endif
andersca@apple.comf33fd632011-01-06 02:39:45 +000090 class ResourceRequest;
andersca@apple.com2da2e1c2011-06-24 22:03:55 +000091 class ResourceResponse;
weinig@apple.comd773bc12010-04-09 00:49:12 +000092}
93
94namespace WebKit {
95
weinig@apple.comc46f4212010-06-15 23:17:21 +000096class InjectedBundle;
ap@apple.come10b7ae2010-08-26 23:03:26 +000097class WebFrame;
weinig@apple.comd773bc12010-04-09 00:49:12 +000098class WebPage;
aroben@apple.com4d29e772010-09-24 17:24:14 +000099struct WebPageCreationParameters;
weinig@apple.com40a04ca2010-12-01 22:00:01 +0000100struct WebPageGroupData;
andersca@apple.com8d57cfd2010-06-21 18:57:45 +0000101struct WebPreferencesStore;
weinig@apple.com18891a22010-10-04 21:14:58 +0000102struct WebProcessCreationParameters;
weinig@apple.comd773bc12010-04-09 00:49:12 +0000103
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000104#if ENABLE(NETWORK_PROCESS)
105class NetworkProcessConnection;
106#endif
107
aestes@apple.com1c4d8332012-06-03 02:46:11 +0000108#if USE(SECURITY_FRAMEWORK)
andersca@apple.com222a6312012-01-10 22:50:51 +0000109class SecItemResponseData;
andersca@apple.com222a6312012-01-10 22:50:51 +0000110#endif
111
andersca@apple.coma4c481e2012-12-13 20:53:03 +0000112class WebProcess : public ChildProcess, private CoreIPC::Connection::QueueClient, private DownloadManager::Client {
weinig@apple.comd773bc12010-04-09 00:49:12 +0000113public:
114 static WebProcess& shared();
115
weinig@apple.comfa219592012-01-20 03:04:51 +0000116 void initialize(CoreIPC::Connection::Identifier, WebCore::RunLoop*);
weinig@apple.comd773bc12010-04-09 00:49:12 +0000117
weinig@apple.comb59f55f2012-11-21 05:23:35 +0000118 CoreIPC::Connection* connection() const { return m_connection.get(); }
weinig@apple.comfa219592012-01-20 03:04:51 +0000119 WebCore::RunLoop* runLoop() const { return m_runLoop; }
weinig@apple.comd773bc12010-04-09 00:49:12 +0000120
andersca@apple.combb2611b2012-10-22 22:09:56 +0000121 void addMessageReceiver(CoreIPC::StringReference messageReceiverName, CoreIPC::MessageReceiver*);
andersca@apple.coma2d4ce12012-10-24 19:31:16 +0000122 void addMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID, CoreIPC::MessageReceiver*);
andersca@apple.coma2d4ce12012-10-24 19:31:16 +0000123 void removeMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID);
andersca@apple.combb2611b2012-10-22 22:09:56 +0000124
weinig@apple.comb59f55f2012-11-21 05:23:35 +0000125 WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
weinig@apple.com8fcaba12011-12-09 23:45:49 +0000126
weinig@apple.comd773bc12010-04-09 00:49:12 +0000127 WebPage* webPage(uint64_t pageID) const;
weinig@apple.comd4982102010-10-04 20:06:49 +0000128 void createWebPage(uint64_t pageID, const WebPageCreationParameters&);
weinig@apple.comd773bc12010-04-09 00:49:12 +0000129 void removeWebPage(uint64_t pageID);
cfleizach@apple.com1d0d4fa2011-03-11 00:40:05 +0000130 WebPage* focusedWebPage() const;
commit-queue@webkit.org6ff31532012-08-15 13:03:19 +0000131
132#if ENABLE(WEB_INTENTS)
133 uint64_t addMessagePortChannel(PassRefPtr<WebCore::PlatformMessagePortChannel>);
134 WebCore::PlatformMessagePortChannel* messagePortChannel(uint64_t);
135 void removeMessagePortChannel(uint64_t);
136#endif
137
weinig@apple.comc46f4212010-06-15 23:17:21 +0000138 InjectedBundle* injectedBundle() const { return m_injectedBundle.get(); }
139
weinig@apple.comd773bc12010-04-09 00:49:12 +0000140 bool isSeparateProcess() const;
simon.fraser@apple.comd5cafa92010-07-01 23:26:00 +0000141
beidson@apple.com40aa0442011-05-17 17:12:37 +0000142#if PLATFORM(MAC)
143 void initializeShim();
weinig@apple.com7d9c69d2012-09-09 22:48:00 +0000144 void initializeSandbox(const String& clientIdentifier);
beidson@apple.com40aa0442011-05-17 17:12:37 +0000145
146#if USE(ACCELERATED_COMPOSITING)
simon.fraser@apple.comd5cafa92010-07-01 23:26:00 +0000147 mach_port_t compositingRenderServerPort() const { return m_compositingRenderServerPort; }
148#endif
beidson@apple.com40aa0442011-05-17 17:12:37 +0000149#endif
weinig@apple.comd773bc12010-04-09 00:49:12 +0000150
abecsi@webkit.orgd14cfc42012-05-16 09:58:59 +0000151 void setShouldTrackVisitedLinks(bool);
andersca@apple.com741ac222010-08-06 00:00:45 +0000152 void addVisitedLink(WebCore::LinkHash);
153 bool isLinkVisited(WebCore::LinkHash) const;
154
jonlee@apple.comf494c4f2012-12-11 01:33:15 +0000155 bool isPlugInAutoStartOrigin(unsigned plugInOriginhash);
156 void addPlugInAutoStartOrigin(const String& pageOrigin, unsigned plugInOriginHash);
157
ap@apple.com20e84272011-11-07 22:51:59 +0000158 bool fullKeyboardAccessEnabled() const { return m_fullKeyboardAccessEnabled; }
ap@apple.com46758802011-03-03 21:34:20 +0000159
ap@apple.come10b7ae2010-08-26 23:03:26 +0000160 WebFrame* webFrame(uint64_t) const;
161 void addWebFrame(uint64_t, WebFrame*);
162 void removeWebFrame(uint64_t);
163
weinig@apple.com40a04ca2010-12-01 22:00:01 +0000164 WebPageGroupProxy* webPageGroup(uint64_t pageGroupID);
165 WebPageGroupProxy* webPageGroup(const WebPageGroupData&);
cfleizach@apple.comaa504102011-01-05 01:07:44 +0000166#if PLATFORM(MAC)
167 pid_t presenterApplicationPid() const { return m_presenterApplicationPid; }
mitz@apple.comd2d65b92012-09-26 05:13:21 +0000168 bool shouldForceScreenFontSubstitution() const { return m_shouldForceScreenFontSubstitution; }
timothy_horton@apple.com764bd8b2012-10-14 21:00:53 +0000169#endif
cfleizach@apple.comaa504102011-01-05 01:07:44 +0000170
jocelyn.turcotte@nokia.com36e9e692010-12-10 03:36:23 +0000171#if PLATFORM(QT)
172 QNetworkAccessManager* networkAccessManager() { return m_networkAccessManager; }
173#endif
174
weinig@apple.com4201e962011-01-10 19:20:15 +0000175 // Text Checking
andersca@apple.com190ba932011-01-04 22:41:52 +0000176 const TextCheckerState& textCheckerState() const { return m_textCheckerState; }
177
weinig@apple.com4201e962011-01-10 19:20:15 +0000178 // Geolocation
179 WebGeolocationManager& geolocationManager() { return m_geolocationManager; }
commit-queue@webkit.org3c260882012-07-03 23:31:49 +0000180
181#if ENABLE(BATTERY_STATUS)
182 WebBatteryManager& batteryManager() { return m_batteryManager; }
183#endif
commit-queue@webkit.orga87fcb42012-07-06 19:12:12 +0000184
185#if ENABLE(NETWORK_INFO)
186 WebNetworkInfoManager& networkInfoManager() { return m_networkInfoManager; }
187#endif
jonlee@apple.com6c095452011-11-29 01:08:35 +0000188
jonlee@apple.comed78cdb2012-03-14 23:41:04 +0000189#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
jonlee@apple.com6c095452011-11-29 01:08:35 +0000190 WebNotificationManager& notificationManager() { return m_notificationManager; }
191#endif
weinig@apple.com4201e962011-01-10 19:20:15 +0000192
weinig@apple.com3d435c12011-04-05 05:38:43 +0000193 void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
beidson@apple.com0e810aa2011-03-14 05:47:55 +0000194
195 const String& localStorageDirectory() const { return m_localStorageDirectory; }
bweinstein@apple.comdc08e392011-02-17 19:28:36 +0000196
andersca@apple.com70c2c202011-05-03 00:53:03 +0000197#if ENABLE(PLUGIN_PROCESS)
198 PluginProcessConnectionManager& pluginProcessConnectionManager() { return m_pluginProcessConnectionManager; }
199#endif
200
andersca@apple.comff7ca8e2011-12-18 18:01:53 +0000201 EventDispatcher& eventDispatcher() { return m_eventDispatcher; }
202
carlosgc@webkit.org5d9808b2012-04-27 07:13:40 +0000203#if USE(SOUP)
204 WebSoupRequestManager& soupRequestManager() { return m_soupRequestManager; }
205#endif
206
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000207#if ENABLE(NETWORK_PROCESS)
beidson@apple.com2d312322012-10-27 05:59:24 +0000208 NetworkProcessConnection* networkConnection();
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000209 void networkProcessConnectionClosed(NetworkProcessConnection*);
beidson@apple.com2d312322012-10-27 05:59:24 +0000210 bool usesNetworkProcess() const { return m_usesNetworkProcess; }
beidson@apple.com33785562012-10-25 17:16:38 +0000211 WebResourceLoadScheduler& webResourceLoadScheduler() { return m_webResourceLoadScheduler; }
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000212#endif
213
commit-queue@webkit.orgeb809422012-11-22 13:23:41 +0000214 void setCacheModel(uint32_t);
215
ap@apple.comc1189a32012-12-04 18:59:15 +0000216 void ensurePrivateBrowsingSession();
217 void destroyPrivateBrowsingSession();
218
andersca@apple.coma4c481e2012-12-13 20:53:03 +0000219 DownloadManager& downloadManager();
220
weinig@apple.comd773bc12010-04-09 00:49:12 +0000221private:
222 WebProcess();
weinig@apple.comd773bc12010-04-09 00:49:12 +0000223
andersca@apple.com41ede032012-12-13 22:27:24 +0000224 // DownloadManager::Client.
225 virtual void didCreateDownload() OVERRIDE;
226 virtual void didDestroyDownload() OVERRIDE;
andersca@apple.com93b4c362012-12-16 01:26:05 +0000227 virtual CoreIPC::Connection* downloadProxyConnection() OVERRIDE;
andersca@apple.com41ede032012-12-13 22:27:24 +0000228
andersca@apple.comf66b7ca2012-10-18 21:33:56 +0000229 void initializeWebProcess(const WebProcessCreationParameters&, CoreIPC::MessageDecoder&);
230 void platformInitializeWebProcess(const WebProcessCreationParameters&, CoreIPC::MessageDecoder&);
andersca@apple.comd1069692011-02-23 00:42:06 +0000231 void platformTerminate();
weinig@apple.comc3c27e82010-09-18 05:34:21 +0000232 void registerURLSchemeAsEmptyDocument(const String&);
jberlin@webkit.org6ea089c2010-10-12 22:37:49 +0000233 void registerURLSchemeAsSecure(const String&) const;
jberlin@webkit.orgf91419d2010-10-13 14:42:35 +0000234 void setDomainRelaxationForbiddenForURLScheme(const String&) const;
carlosgc@webkit.orgeb7e60e2012-09-19 11:32:29 +0000235 void registerURLSchemeAsLocal(const String&) const;
236 void registerURLSchemeAsNoAccess(const String&) const;
237 void registerURLSchemeAsDisplayIsolated(const String&) const;
238 void registerURLSchemeAsCORSEnabled(const String&) const;
ap@apple.comafb45882011-02-21 22:47:03 +0000239 void setDefaultRequestTimeoutInterval(double);
mitz@apple.comf8ff23a2010-12-17 19:45:12 +0000240 void setAlwaysUsesComplexTextCodePath(bool);
simon.fraser@apple.com4908b1632011-10-06 00:08:04 +0000241 void setShouldUseFontSmoothing(bool);
eric.carlson@apple.comefb33fc2012-01-18 21:45:15 +0000242 void userPreferredLanguagesChanged(const Vector<String>&) const;
ap@apple.com20e84272011-11-07 22:51:59 +0000243 void fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled);
weinig@apple.comd4982102010-10-04 20:06:49 +0000244#if PLATFORM(WIN)
245 void setShouldPaintNativeControls(bool);
246#endif
247
andersca@apple.com741ac222010-08-06 00:00:45 +0000248 void setVisitedLinkTable(const SharedMemory::Handle&);
249 void visitedLinkStateChanged(const Vector<WebCore::LinkHash>& linkHashes);
250 void allVisitedLinkStateChanged();
weinig@apple.com47a15042010-10-04 17:15:41 +0000251
jonlee@apple.comf494c4f2012-12-11 01:33:15 +0000252 void didAddPlugInAutoStartOrigin(unsigned plugInOriginHash);
253
weinig@apple.com47a15042010-10-04 17:15:41 +0000254 void platformSetCacheModel(CacheModel);
jberlin@webkit.org9a24b922011-03-10 21:17:46 +0000255 void platformClearResourceCaches(ResourceCachesToClear);
darin@apple.com7316ce52010-11-19 22:23:24 +0000256 void clearApplicationCache();
weinig@apple.com47a15042010-10-04 17:15:41 +0000257
cfleizach@apple.com6d6ea132011-03-16 21:01:41 +0000258 void setEnhancedAccessibility(bool);
259
andersca@apple.come564e962011-02-16 00:49:26 +0000260#if !ENABLE(PLUGIN_PROCESS)
261 void getSitesWithPluginData(const Vector<String>& pluginPaths, uint64_t callbackID);
andersca@apple.comd08dc072011-02-16 01:55:02 +0000262 void clearPluginSiteData(const Vector<String>& pluginPaths, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
andersca@apple.come564e962011-02-16 00:49:26 +0000263#endif
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000264
andersca@apple.comc78c02b2011-05-03 01:12:40 +0000265#if ENABLE(PLUGIN_PROCESS)
commit-queue@webkit.org52857942012-11-30 02:18:39 +0000266 void pluginProcessCrashed(CoreIPC::Connection*, const String& pluginPath, uint32_t processType);
andersca@apple.comc78c02b2011-05-03 01:12:40 +0000267#endif
268
slewis@apple.comb211c4b2011-01-08 02:24:40 +0000269 void startMemorySampler(const SandboxExtension::Handle&, const String&, const double);
270 void stopMemorySampler();
271
andersca@apple.comf33fd632011-01-06 02:39:45 +0000272 void downloadRequest(uint64_t downloadID, uint64_t initiatingPageID, const WebCore::ResourceRequest&);
andersca@apple.com09c7e622010-11-29 23:34:17 +0000273 void cancelDownload(uint64_t downloadID);
commit-queue@webkit.org28731582011-11-03 13:05:25 +0000274#if PLATFORM(QT)
275 void startTransfer(uint64_t downloadID, const String& destination);
276#endif
andersca@apple.com09c7e622010-11-29 23:34:17 +0000277
andersca@apple.com190ba932011-01-04 22:41:52 +0000278 void setTextCheckerState(const TextCheckerState&);
adachan@apple.come51a25a2011-08-30 22:09:21 +0000279
280 void getWebCoreStatistics(uint64_t callbackID);
commit-queue@webkit.org536245c2011-09-03 01:20:49 +0000281 void garbageCollectJavaScriptObjects();
msaboff@apple.comfb5f4cc2012-05-14 23:47:53 +0000282 void setJavaScriptGarbageCollectorTimerEnabled(bool flag);
andersca@apple.com190ba932011-01-04 22:41:52 +0000283
andersca@apple.com0214d832012-10-12 00:56:10 +0000284 void postInjectedBundleMessage(const CoreIPC::DataReference& messageData);
285
aestes@apple.com1c4d8332012-06-03 02:46:11 +0000286#if USE(SECURITY_FRAMEWORK)
andersca@apple.com222a6312012-01-10 22:50:51 +0000287 void secItemResponse(CoreIPC::Connection*, uint64_t requestID, const SecItemResponseData&);
andersca@apple.com222a6312012-01-10 22:50:51 +0000288#endif
289
andersca@apple.comc31f8d22011-04-13 21:29:36 +0000290 // ChildProcess
291 virtual bool shouldTerminate();
andersca@apple.com5fe589e2011-04-13 22:24:28 +0000292 virtual void terminate();
andersca@apple.comc31f8d22011-04-13 21:29:36 +0000293
weinig@apple.comd773bc12010-04-09 00:49:12 +0000294 // CoreIPC::Connection::Client
weinig@apple.com5e61b0c2011-12-05 18:41:53 +0000295 friend class WebConnectionToUIProcess;
andersca@apple.comf66b7ca2012-10-18 21:33:56 +0000296 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
297 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
andersca@apple.com38ac4742011-04-19 21:16:45 +0000298 virtual void didClose(CoreIPC::Connection*);
andersca@apple.com8e5f9bb2012-10-31 17:36:38 +0000299 virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE;
weinig@apple.com5e61b0c2011-12-05 18:41:53 +0000300#if PLATFORM(WIN)
301 virtual Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply();
302#endif
andersca@apple.com38ac4742011-04-19 21:16:45 +0000303
andersca@apple.com91cacbf2011-05-03 01:19:07 +0000304 // CoreIPC::Connection::QueueClient
andersca@apple.comf66b7ca2012-10-18 21:33:56 +0000305 virtual void didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, bool& didHandleMessage) OVERRIDE;
weinig@apple.comd773bc12010-04-09 00:49:12 +0000306
weinig@apple.comd4982102010-10-04 20:06:49 +0000307 // Implemented in generated WebProcessMessageReceiver.cpp
andersca@apple.comf66b7ca2012-10-18 21:33:56 +0000308 void didReceiveWebProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
309 void didReceiveWebProcessMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, bool& didHandleMessage);
andersca@apple.com91cacbf2011-05-03 01:19:07 +0000310
commit-queue@webkit.org08462192012-10-19 02:43:49 +0000311#if ENABLE(NETSCAPE_PLUGIN_API)
kling@webkit.org89ef6682012-05-11 19:49:28 +0000312 void didGetPlugins(CoreIPC::Connection*, uint64_t requestID, const Vector<WebCore::PluginInfo>&);
commit-queue@webkit.org08462192012-10-19 02:43:49 +0000313#endif
kling@webkit.org89ef6682012-05-11 19:49:28 +0000314
aestes@apple.com8ebb8c12012-11-14 23:29:37 +0000315#if ENABLE(CUSTOM_PROTOCOLS)
316 void registerSchemeForCustomProtocol(const WTF::String&);
317 void unregisterSchemeForCustomProtocol(const WTF::String&);
318#endif
319
weinig@apple.comb59f55f2012-11-21 05:23:35 +0000320 RefPtr<CoreIPC::Connection> m_connection;
andersca@apple.combb2611b2012-10-22 22:09:56 +0000321 CoreIPC::MessageReceiverMap m_messageReceiverMap;
weinig@apple.com5e61b0c2011-12-05 18:41:53 +0000322
weinig@apple.comb59f55f2012-11-21 05:23:35 +0000323 RefPtr<WebConnectionToUIProcess> m_webConnection;
324
weinig@apple.comd773bc12010-04-09 00:49:12 +0000325 HashMap<uint64_t, RefPtr<WebPage> > m_pageMap;
weinig@apple.com40a04ca2010-12-01 22:00:01 +0000326 HashMap<uint64_t, RefPtr<WebPageGroupProxy> > m_pageGroupMap;
weinig@apple.comc46f4212010-06-15 23:17:21 +0000327 RefPtr<InjectedBundle> m_injectedBundle;
weinig@apple.comd773bc12010-04-09 00:49:12 +0000328
jberlin@webkit.orga163d3e2011-12-13 00:52:46 +0000329 EventDispatcher m_eventDispatcher;
330
weinig@apple.com5feed4a2010-04-13 23:51:17 +0000331 bool m_inDidClose;
332
weinig@apple.comfa219592012-01-20 03:04:51 +0000333 WebCore::RunLoop* m_runLoop;
simon.fraser@apple.comd5cafa92010-07-01 23:26:00 +0000334
andersca@apple.com741ac222010-08-06 00:00:45 +0000335 // FIXME: The visited link table should not be per process.
336 VisitedLinkTable m_visitedLinkTable;
abecsi@webkit.orgd14cfc42012-05-16 09:58:59 +0000337 bool m_shouldTrackVisitedLinks;
andersca@apple.com741ac222010-08-06 00:00:45 +0000338
jonlee@apple.comf494c4f2012-12-11 01:33:15 +0000339 HashSet<unsigned> m_plugInAutoStartOrigins;
340
weinig@apple.com47a15042010-10-04 17:15:41 +0000341 bool m_hasSetCacheModel;
342 CacheModel m_cacheModel;
343
simon.fraser@apple.comd5cafa92010-07-01 23:26:00 +0000344#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
345 mach_port_t m_compositingRenderServerPort;
346#endif
cfleizach@apple.comaa504102011-01-05 01:07:44 +0000347#if PLATFORM(MAC)
348 pid_t m_presenterApplicationPid;
kling@webkit.orgdf242ce2012-04-23 22:52:13 +0000349 dispatch_group_t m_clearResourceCachesDispatchGroup;
mitz@apple.comd2d65b92012-09-26 05:13:21 +0000350 bool m_shouldForceScreenFontSubstitution;
cfleizach@apple.comaa504102011-01-05 01:07:44 +0000351#endif
ap@apple.come10b7ae2010-08-26 23:03:26 +0000352
ap@apple.com20e84272011-11-07 22:51:59 +0000353 bool m_fullKeyboardAccessEnabled;
354
jocelyn.turcotte@nokia.com36e9e692010-12-10 03:36:23 +0000355#if PLATFORM(QT)
356 QNetworkAccessManager* m_networkAccessManager;
357#endif
358
ap@apple.come10b7ae2010-08-26 23:03:26 +0000359 HashMap<uint64_t, WebFrame*> m_frameMap;
andersca@apple.com481efa32010-12-09 18:37:30 +0000360
commit-queue@webkit.org6ff31532012-08-15 13:03:19 +0000361#if ENABLE(WEB_INTENTS)
362 HashMap<uint64_t, RefPtr<WebCore::PlatformMessagePortChannel> > m_messagePortChannels;
363#endif
364
andersca@apple.com190ba932011-01-04 22:41:52 +0000365 TextCheckerState m_textCheckerState;
weinig@apple.com4201e962011-01-10 19:20:15 +0000366 WebGeolocationManager m_geolocationManager;
commit-queue@webkit.org3c260882012-07-03 23:31:49 +0000367#if ENABLE(BATTERY_STATUS)
368 WebBatteryManager m_batteryManager;
369#endif
commit-queue@webkit.orga87fcb42012-07-06 19:12:12 +0000370#if ENABLE(NETWORK_INFO)
371 WebNetworkInfoManager m_networkInfoManager;
372#endif
jonlee@apple.comed78cdb2012-03-14 23:41:04 +0000373#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
jonlee@apple.com6c095452011-11-29 01:08:35 +0000374 WebNotificationManager m_notificationManager;
375#endif
beidson@apple.com3f10cc62011-03-16 02:15:52 +0000376 WebIconDatabaseProxy m_iconDatabaseProxy;
beidson@apple.com0e810aa2011-03-14 05:47:55 +0000377
378 String m_localStorageDirectory;
andersca@apple.com004d4ce2011-04-29 19:12:02 +0000379
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000380#if ENABLE(NETWORK_PROCESS)
381 void ensureNetworkProcessConnection();
382 RefPtr<NetworkProcessConnection> m_networkProcessConnection;
beidson@apple.come039bb32012-10-20 00:00:19 +0000383 bool m_usesNetworkProcess;
beidson@apple.com33785562012-10-25 17:16:38 +0000384 WebResourceLoadScheduler m_webResourceLoadScheduler;
beidson@apple.comdfbdf942012-10-19 23:26:16 +0000385#endif
386
andersca@apple.com70c2c202011-05-03 00:53:03 +0000387#if ENABLE(PLUGIN_PROCESS)
388 PluginProcessConnectionManager m_pluginProcessConnectionManager;
389#endif
andersca@apple.com15582122011-08-09 21:52:55 +0000390
carlosgc@webkit.org5d9808b2012-04-27 07:13:40 +0000391#if USE(SOUP)
392 WebSoupRequestManager m_soupRequestManager;
393#endif
394
weinig@apple.comd773bc12010-04-09 00:49:12 +0000395};
396
397} // namespace WebKit
398
399#endif // WebProcess_h