weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 1 | /* |
| 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.com | 47a1504 | 2010-10-04 17:15:41 +0000 | [diff] [blame] | 29 | #include "CacheModel.h" |
andersca@apple.com | 059f5fb | 2010-11-05 22:55:41 +0000 | [diff] [blame] | 30 | #include "ChildProcess.h" |
andersca@apple.com | a4c481e | 2012-12-13 20:53:03 +0000 | [diff] [blame] | 31 | #include "DownloadManager.h" |
weinig@apple.com | 31cb241 | 2010-04-09 20:49:01 +0000 | [diff] [blame] | 32 | #include "DrawingArea.h" |
jberlin@webkit.org | a163d3e | 2011-12-13 00:52:46 +0000 | [diff] [blame] | 33 | #include "EventDispatcher.h" |
andersca@apple.com | bb2611b | 2012-10-22 22:09:56 +0000 | [diff] [blame] | 34 | #include "MessageReceiverMap.h" |
kling@webkit.org | 89ef668 | 2012-05-11 19:49:28 +0000 | [diff] [blame] | 35 | #include "PluginInfoStore.h" |
jberlin@webkit.org | 9a24b92 | 2011-03-10 21:17:46 +0000 | [diff] [blame] | 36 | #include "ResourceCachesToClear.h" |
slewis@apple.com | b211c4b | 2011-01-08 02:24:40 +0000 | [diff] [blame] | 37 | #include "SandboxExtension.h" |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 38 | #include "SharedMemory.h" |
andersca@apple.com | 190ba93 | 2011-01-04 22:41:52 +0000 | [diff] [blame] | 39 | #include "TextCheckerState.h" |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 40 | #include "VisitedLinkTable.h" |
weinig@apple.com | 5e61b0c | 2011-12-05 18:41:53 +0000 | [diff] [blame] | 41 | #include "WebConnectionToUIProcess.h" |
weinig@apple.com | 4201e96 | 2011-01-10 19:20:15 +0000 | [diff] [blame] | 42 | #include "WebGeolocationManager.h" |
beidson@apple.com | 3f10cc6 | 2011-03-16 02:15:52 +0000 | [diff] [blame] | 43 | #include "WebIconDatabaseProxy.h" |
weinig@apple.com | 40a04ca | 2010-12-01 22:00:01 +0000 | [diff] [blame] | 44 | #include "WebPageGroupProxy.h" |
beidson@apple.com | 4a633ad | 2010-08-02 21:10:52 +0000 | [diff] [blame] | 45 | #include <WebCore/LinkHash.h> |
barraclough@apple.com | d218c2d | 2010-08-10 00:38:14 +0000 | [diff] [blame] | 46 | #include <wtf/Forward.h> |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 47 | #include <wtf/HashMap.h> |
andersca@apple.com | 481efa3 | 2010-12-09 18:37:30 +0000 | [diff] [blame] | 48 | #include <wtf/HashSet.h> |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 49 | |
carlosgc@webkit.org | 5d9808b | 2012-04-27 07:13:40 +0000 | [diff] [blame] | 50 | #if USE(SOUP) |
| 51 | #include "WebSoupRequestManager.h" |
| 52 | #endif |
| 53 | |
jocelyn.turcotte@nokia.com | 36e9e69 | 2010-12-10 03:36:23 +0000 | [diff] [blame] | 54 | #if PLATFORM(QT) |
hausmann@webkit.org | fc0c1c6 | 2012-07-24 11:33:43 +0000 | [diff] [blame] | 55 | QT_BEGIN_NAMESPACE |
jocelyn.turcotte@nokia.com | 36e9e69 | 2010-12-10 03:36:23 +0000 | [diff] [blame] | 56 | class QNetworkAccessManager; |
hausmann@webkit.org | fc0c1c6 | 2012-07-24 11:33:43 +0000 | [diff] [blame] | 57 | QT_END_NAMESPACE |
jocelyn.turcotte@nokia.com | 36e9e69 | 2010-12-10 03:36:23 +0000 | [diff] [blame] | 58 | #endif |
| 59 | |
kling@webkit.org | df242ce | 2012-04-23 22:52:13 +0000 | [diff] [blame] | 60 | #if PLATFORM(MAC) |
| 61 | #include <dispatch/dispatch.h> |
| 62 | #endif |
| 63 | |
commit-queue@webkit.org | 3c26088 | 2012-07-03 23:31:49 +0000 | [diff] [blame] | 64 | #if ENABLE(BATTERY_STATUS) |
| 65 | #include "WebBatteryManager.h" |
| 66 | #endif |
| 67 | |
commit-queue@webkit.org | a87fcb4 | 2012-07-06 19:12:12 +0000 | [diff] [blame] | 68 | #if ENABLE(NETWORK_INFO) |
| 69 | #include "WebNetworkInfoManager.h" |
| 70 | #endif |
| 71 | |
jonlee@apple.com | ed78cdb | 2012-03-14 23:41:04 +0000 | [diff] [blame] | 72 | #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
jonlee@apple.com | 6c09545 | 2011-11-29 01:08:35 +0000 | [diff] [blame] | 73 | #include "WebNotificationManager.h" |
| 74 | #endif |
| 75 | |
beidson@apple.com | 3378556 | 2012-10-25 17:16:38 +0000 | [diff] [blame] | 76 | #if ENABLE(NETWORK_PROCESS) |
| 77 | #include "WebResourceLoadScheduler.h" |
| 78 | #endif |
| 79 | |
andersca@apple.com | 70c2c20 | 2011-05-03 00:53:03 +0000 | [diff] [blame] | 80 | #if ENABLE(PLUGIN_PROCESS) |
| 81 | #include "PluginProcessConnectionManager.h" |
| 82 | #endif |
| 83 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 84 | namespace WebCore { |
| 85 | class IntSize; |
weinig@apple.com | 17cf995 | 2010-08-28 02:16:40 +0000 | [diff] [blame] | 86 | class PageGroup; |
commit-queue@webkit.org | 6ff3153 | 2012-08-15 13:03:19 +0000 | [diff] [blame] | 87 | #if ENABLE(WEB_INTENTS) |
| 88 | class PlatformMessagePortChannel; |
| 89 | #endif |
andersca@apple.com | f33fd63 | 2011-01-06 02:39:45 +0000 | [diff] [blame] | 90 | class ResourceRequest; |
andersca@apple.com | 2da2e1c | 2011-06-24 22:03:55 +0000 | [diff] [blame] | 91 | class ResourceResponse; |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | namespace WebKit { |
| 95 | |
weinig@apple.com | c46f421 | 2010-06-15 23:17:21 +0000 | [diff] [blame] | 96 | class InjectedBundle; |
ap@apple.com | e10b7ae | 2010-08-26 23:03:26 +0000 | [diff] [blame] | 97 | class WebFrame; |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 98 | class WebPage; |
aroben@apple.com | 4d29e77 | 2010-09-24 17:24:14 +0000 | [diff] [blame] | 99 | struct WebPageCreationParameters; |
weinig@apple.com | 40a04ca | 2010-12-01 22:00:01 +0000 | [diff] [blame] | 100 | struct WebPageGroupData; |
andersca@apple.com | 8d57cfd | 2010-06-21 18:57:45 +0000 | [diff] [blame] | 101 | struct WebPreferencesStore; |
weinig@apple.com | 18891a2 | 2010-10-04 21:14:58 +0000 | [diff] [blame] | 102 | struct WebProcessCreationParameters; |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 103 | |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 104 | #if ENABLE(NETWORK_PROCESS) |
| 105 | class NetworkProcessConnection; |
| 106 | #endif |
| 107 | |
aestes@apple.com | 1c4d833 | 2012-06-03 02:46:11 +0000 | [diff] [blame] | 108 | #if USE(SECURITY_FRAMEWORK) |
andersca@apple.com | 222a631 | 2012-01-10 22:50:51 +0000 | [diff] [blame] | 109 | class SecItemResponseData; |
andersca@apple.com | 222a631 | 2012-01-10 22:50:51 +0000 | [diff] [blame] | 110 | #endif |
| 111 | |
andersca@apple.com | a4c481e | 2012-12-13 20:53:03 +0000 | [diff] [blame] | 112 | class WebProcess : public ChildProcess, private CoreIPC::Connection::QueueClient, private DownloadManager::Client { |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 113 | public: |
| 114 | static WebProcess& shared(); |
| 115 | |
weinig@apple.com | fa21959 | 2012-01-20 03:04:51 +0000 | [diff] [blame] | 116 | void initialize(CoreIPC::Connection::Identifier, WebCore::RunLoop*); |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 117 | |
weinig@apple.com | b59f55f | 2012-11-21 05:23:35 +0000 | [diff] [blame] | 118 | CoreIPC::Connection* connection() const { return m_connection.get(); } |
weinig@apple.com | fa21959 | 2012-01-20 03:04:51 +0000 | [diff] [blame] | 119 | WebCore::RunLoop* runLoop() const { return m_runLoop; } |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 120 | |
andersca@apple.com | bb2611b | 2012-10-22 22:09:56 +0000 | [diff] [blame] | 121 | void addMessageReceiver(CoreIPC::StringReference messageReceiverName, CoreIPC::MessageReceiver*); |
andersca@apple.com | a2d4ce1 | 2012-10-24 19:31:16 +0000 | [diff] [blame] | 122 | void addMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID, CoreIPC::MessageReceiver*); |
andersca@apple.com | a2d4ce1 | 2012-10-24 19:31:16 +0000 | [diff] [blame] | 123 | void removeMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID); |
andersca@apple.com | bb2611b | 2012-10-22 22:09:56 +0000 | [diff] [blame] | 124 | |
weinig@apple.com | b59f55f | 2012-11-21 05:23:35 +0000 | [diff] [blame] | 125 | WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); } |
weinig@apple.com | 8fcaba1 | 2011-12-09 23:45:49 +0000 | [diff] [blame] | 126 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 127 | WebPage* webPage(uint64_t pageID) const; |
weinig@apple.com | d498210 | 2010-10-04 20:06:49 +0000 | [diff] [blame] | 128 | void createWebPage(uint64_t pageID, const WebPageCreationParameters&); |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 129 | void removeWebPage(uint64_t pageID); |
cfleizach@apple.com | 1d0d4fa | 2011-03-11 00:40:05 +0000 | [diff] [blame] | 130 | WebPage* focusedWebPage() const; |
commit-queue@webkit.org | 6ff3153 | 2012-08-15 13:03:19 +0000 | [diff] [blame] | 131 | |
| 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.com | c46f421 | 2010-06-15 23:17:21 +0000 | [diff] [blame] | 138 | InjectedBundle* injectedBundle() const { return m_injectedBundle.get(); } |
| 139 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 140 | bool isSeparateProcess() const; |
simon.fraser@apple.com | d5cafa9 | 2010-07-01 23:26:00 +0000 | [diff] [blame] | 141 | |
beidson@apple.com | 40aa044 | 2011-05-17 17:12:37 +0000 | [diff] [blame] | 142 | #if PLATFORM(MAC) |
| 143 | void initializeShim(); |
weinig@apple.com | 7d9c69d | 2012-09-09 22:48:00 +0000 | [diff] [blame] | 144 | void initializeSandbox(const String& clientIdentifier); |
beidson@apple.com | 40aa044 | 2011-05-17 17:12:37 +0000 | [diff] [blame] | 145 | |
| 146 | #if USE(ACCELERATED_COMPOSITING) |
simon.fraser@apple.com | d5cafa9 | 2010-07-01 23:26:00 +0000 | [diff] [blame] | 147 | mach_port_t compositingRenderServerPort() const { return m_compositingRenderServerPort; } |
| 148 | #endif |
beidson@apple.com | 40aa044 | 2011-05-17 17:12:37 +0000 | [diff] [blame] | 149 | #endif |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 150 | |
abecsi@webkit.org | d14cfc4 | 2012-05-16 09:58:59 +0000 | [diff] [blame] | 151 | void setShouldTrackVisitedLinks(bool); |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 152 | void addVisitedLink(WebCore::LinkHash); |
| 153 | bool isLinkVisited(WebCore::LinkHash) const; |
| 154 | |
jonlee@apple.com | f494c4f | 2012-12-11 01:33:15 +0000 | [diff] [blame] | 155 | bool isPlugInAutoStartOrigin(unsigned plugInOriginhash); |
| 156 | void addPlugInAutoStartOrigin(const String& pageOrigin, unsigned plugInOriginHash); |
| 157 | |
ap@apple.com | 20e8427 | 2011-11-07 22:51:59 +0000 | [diff] [blame] | 158 | bool fullKeyboardAccessEnabled() const { return m_fullKeyboardAccessEnabled; } |
ap@apple.com | 4675880 | 2011-03-03 21:34:20 +0000 | [diff] [blame] | 159 | |
ap@apple.com | e10b7ae | 2010-08-26 23:03:26 +0000 | [diff] [blame] | 160 | WebFrame* webFrame(uint64_t) const; |
| 161 | void addWebFrame(uint64_t, WebFrame*); |
| 162 | void removeWebFrame(uint64_t); |
| 163 | |
weinig@apple.com | 40a04ca | 2010-12-01 22:00:01 +0000 | [diff] [blame] | 164 | WebPageGroupProxy* webPageGroup(uint64_t pageGroupID); |
| 165 | WebPageGroupProxy* webPageGroup(const WebPageGroupData&); |
cfleizach@apple.com | aa50410 | 2011-01-05 01:07:44 +0000 | [diff] [blame] | 166 | #if PLATFORM(MAC) |
| 167 | pid_t presenterApplicationPid() const { return m_presenterApplicationPid; } |
mitz@apple.com | d2d65b9 | 2012-09-26 05:13:21 +0000 | [diff] [blame] | 168 | bool shouldForceScreenFontSubstitution() const { return m_shouldForceScreenFontSubstitution; } |
timothy_horton@apple.com | 764bd8b | 2012-10-14 21:00:53 +0000 | [diff] [blame] | 169 | #endif |
cfleizach@apple.com | aa50410 | 2011-01-05 01:07:44 +0000 | [diff] [blame] | 170 | |
jocelyn.turcotte@nokia.com | 36e9e69 | 2010-12-10 03:36:23 +0000 | [diff] [blame] | 171 | #if PLATFORM(QT) |
| 172 | QNetworkAccessManager* networkAccessManager() { return m_networkAccessManager; } |
| 173 | #endif |
| 174 | |
weinig@apple.com | 4201e96 | 2011-01-10 19:20:15 +0000 | [diff] [blame] | 175 | // Text Checking |
andersca@apple.com | 190ba93 | 2011-01-04 22:41:52 +0000 | [diff] [blame] | 176 | const TextCheckerState& textCheckerState() const { return m_textCheckerState; } |
| 177 | |
weinig@apple.com | 4201e96 | 2011-01-10 19:20:15 +0000 | [diff] [blame] | 178 | // Geolocation |
| 179 | WebGeolocationManager& geolocationManager() { return m_geolocationManager; } |
commit-queue@webkit.org | 3c26088 | 2012-07-03 23:31:49 +0000 | [diff] [blame] | 180 | |
| 181 | #if ENABLE(BATTERY_STATUS) |
| 182 | WebBatteryManager& batteryManager() { return m_batteryManager; } |
| 183 | #endif |
commit-queue@webkit.org | a87fcb4 | 2012-07-06 19:12:12 +0000 | [diff] [blame] | 184 | |
| 185 | #if ENABLE(NETWORK_INFO) |
| 186 | WebNetworkInfoManager& networkInfoManager() { return m_networkInfoManager; } |
| 187 | #endif |
jonlee@apple.com | 6c09545 | 2011-11-29 01:08:35 +0000 | [diff] [blame] | 188 | |
jonlee@apple.com | ed78cdb | 2012-03-14 23:41:04 +0000 | [diff] [blame] | 189 | #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
jonlee@apple.com | 6c09545 | 2011-11-29 01:08:35 +0000 | [diff] [blame] | 190 | WebNotificationManager& notificationManager() { return m_notificationManager; } |
| 191 | #endif |
weinig@apple.com | 4201e96 | 2011-01-10 19:20:15 +0000 | [diff] [blame] | 192 | |
weinig@apple.com | 3d435c1 | 2011-04-05 05:38:43 +0000 | [diff] [blame] | 193 | void clearResourceCaches(ResourceCachesToClear = AllResourceCaches); |
beidson@apple.com | 0e810aa | 2011-03-14 05:47:55 +0000 | [diff] [blame] | 194 | |
| 195 | const String& localStorageDirectory() const { return m_localStorageDirectory; } |
bweinstein@apple.com | dc08e39 | 2011-02-17 19:28:36 +0000 | [diff] [blame] | 196 | |
andersca@apple.com | 70c2c20 | 2011-05-03 00:53:03 +0000 | [diff] [blame] | 197 | #if ENABLE(PLUGIN_PROCESS) |
| 198 | PluginProcessConnectionManager& pluginProcessConnectionManager() { return m_pluginProcessConnectionManager; } |
| 199 | #endif |
| 200 | |
andersca@apple.com | ff7ca8e | 2011-12-18 18:01:53 +0000 | [diff] [blame] | 201 | EventDispatcher& eventDispatcher() { return m_eventDispatcher; } |
| 202 | |
carlosgc@webkit.org | 5d9808b | 2012-04-27 07:13:40 +0000 | [diff] [blame] | 203 | #if USE(SOUP) |
| 204 | WebSoupRequestManager& soupRequestManager() { return m_soupRequestManager; } |
| 205 | #endif |
| 206 | |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 207 | #if ENABLE(NETWORK_PROCESS) |
beidson@apple.com | 2d31232 | 2012-10-27 05:59:24 +0000 | [diff] [blame] | 208 | NetworkProcessConnection* networkConnection(); |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 209 | void networkProcessConnectionClosed(NetworkProcessConnection*); |
beidson@apple.com | 2d31232 | 2012-10-27 05:59:24 +0000 | [diff] [blame] | 210 | bool usesNetworkProcess() const { return m_usesNetworkProcess; } |
beidson@apple.com | 3378556 | 2012-10-25 17:16:38 +0000 | [diff] [blame] | 211 | WebResourceLoadScheduler& webResourceLoadScheduler() { return m_webResourceLoadScheduler; } |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 212 | #endif |
| 213 | |
commit-queue@webkit.org | eb80942 | 2012-11-22 13:23:41 +0000 | [diff] [blame] | 214 | void setCacheModel(uint32_t); |
| 215 | |
ap@apple.com | c1189a3 | 2012-12-04 18:59:15 +0000 | [diff] [blame] | 216 | void ensurePrivateBrowsingSession(); |
| 217 | void destroyPrivateBrowsingSession(); |
| 218 | |
andersca@apple.com | a4c481e | 2012-12-13 20:53:03 +0000 | [diff] [blame] | 219 | DownloadManager& downloadManager(); |
| 220 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 221 | private: |
| 222 | WebProcess(); |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 223 | |
andersca@apple.com | 41ede03 | 2012-12-13 22:27:24 +0000 | [diff] [blame] | 224 | // DownloadManager::Client. |
| 225 | virtual void didCreateDownload() OVERRIDE; |
| 226 | virtual void didDestroyDownload() OVERRIDE; |
andersca@apple.com | 93b4c36 | 2012-12-16 01:26:05 +0000 | [diff] [blame^] | 227 | virtual CoreIPC::Connection* downloadProxyConnection() OVERRIDE; |
andersca@apple.com | 41ede03 | 2012-12-13 22:27:24 +0000 | [diff] [blame] | 228 | |
andersca@apple.com | f66b7ca | 2012-10-18 21:33:56 +0000 | [diff] [blame] | 229 | void initializeWebProcess(const WebProcessCreationParameters&, CoreIPC::MessageDecoder&); |
| 230 | void platformInitializeWebProcess(const WebProcessCreationParameters&, CoreIPC::MessageDecoder&); |
andersca@apple.com | d106969 | 2011-02-23 00:42:06 +0000 | [diff] [blame] | 231 | void platformTerminate(); |
weinig@apple.com | c3c27e8 | 2010-09-18 05:34:21 +0000 | [diff] [blame] | 232 | void registerURLSchemeAsEmptyDocument(const String&); |
jberlin@webkit.org | 6ea089c | 2010-10-12 22:37:49 +0000 | [diff] [blame] | 233 | void registerURLSchemeAsSecure(const String&) const; |
jberlin@webkit.org | f91419d | 2010-10-13 14:42:35 +0000 | [diff] [blame] | 234 | void setDomainRelaxationForbiddenForURLScheme(const String&) const; |
carlosgc@webkit.org | eb7e60e | 2012-09-19 11:32:29 +0000 | [diff] [blame] | 235 | 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.com | afb4588 | 2011-02-21 22:47:03 +0000 | [diff] [blame] | 239 | void setDefaultRequestTimeoutInterval(double); |
mitz@apple.com | f8ff23a | 2010-12-17 19:45:12 +0000 | [diff] [blame] | 240 | void setAlwaysUsesComplexTextCodePath(bool); |
simon.fraser@apple.com | 4908b163 | 2011-10-06 00:08:04 +0000 | [diff] [blame] | 241 | void setShouldUseFontSmoothing(bool); |
eric.carlson@apple.com | efb33fc | 2012-01-18 21:45:15 +0000 | [diff] [blame] | 242 | void userPreferredLanguagesChanged(const Vector<String>&) const; |
ap@apple.com | 20e8427 | 2011-11-07 22:51:59 +0000 | [diff] [blame] | 243 | void fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled); |
weinig@apple.com | d498210 | 2010-10-04 20:06:49 +0000 | [diff] [blame] | 244 | #if PLATFORM(WIN) |
| 245 | void setShouldPaintNativeControls(bool); |
| 246 | #endif |
| 247 | |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 248 | void setVisitedLinkTable(const SharedMemory::Handle&); |
| 249 | void visitedLinkStateChanged(const Vector<WebCore::LinkHash>& linkHashes); |
| 250 | void allVisitedLinkStateChanged(); |
weinig@apple.com | 47a1504 | 2010-10-04 17:15:41 +0000 | [diff] [blame] | 251 | |
jonlee@apple.com | f494c4f | 2012-12-11 01:33:15 +0000 | [diff] [blame] | 252 | void didAddPlugInAutoStartOrigin(unsigned plugInOriginHash); |
| 253 | |
weinig@apple.com | 47a1504 | 2010-10-04 17:15:41 +0000 | [diff] [blame] | 254 | void platformSetCacheModel(CacheModel); |
jberlin@webkit.org | 9a24b92 | 2011-03-10 21:17:46 +0000 | [diff] [blame] | 255 | void platformClearResourceCaches(ResourceCachesToClear); |
darin@apple.com | 7316ce5 | 2010-11-19 22:23:24 +0000 | [diff] [blame] | 256 | void clearApplicationCache(); |
weinig@apple.com | 47a1504 | 2010-10-04 17:15:41 +0000 | [diff] [blame] | 257 | |
cfleizach@apple.com | 6d6ea13 | 2011-03-16 21:01:41 +0000 | [diff] [blame] | 258 | void setEnhancedAccessibility(bool); |
| 259 | |
andersca@apple.com | e564e96 | 2011-02-16 00:49:26 +0000 | [diff] [blame] | 260 | #if !ENABLE(PLUGIN_PROCESS) |
| 261 | void getSitesWithPluginData(const Vector<String>& pluginPaths, uint64_t callbackID); |
andersca@apple.com | d08dc07 | 2011-02-16 01:55:02 +0000 | [diff] [blame] | 262 | void clearPluginSiteData(const Vector<String>& pluginPaths, const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID); |
andersca@apple.com | e564e96 | 2011-02-16 00:49:26 +0000 | [diff] [blame] | 263 | #endif |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 264 | |
andersca@apple.com | c78c02b | 2011-05-03 01:12:40 +0000 | [diff] [blame] | 265 | #if ENABLE(PLUGIN_PROCESS) |
commit-queue@webkit.org | 5285794 | 2012-11-30 02:18:39 +0000 | [diff] [blame] | 266 | void pluginProcessCrashed(CoreIPC::Connection*, const String& pluginPath, uint32_t processType); |
andersca@apple.com | c78c02b | 2011-05-03 01:12:40 +0000 | [diff] [blame] | 267 | #endif |
| 268 | |
slewis@apple.com | b211c4b | 2011-01-08 02:24:40 +0000 | [diff] [blame] | 269 | void startMemorySampler(const SandboxExtension::Handle&, const String&, const double); |
| 270 | void stopMemorySampler(); |
| 271 | |
andersca@apple.com | f33fd63 | 2011-01-06 02:39:45 +0000 | [diff] [blame] | 272 | void downloadRequest(uint64_t downloadID, uint64_t initiatingPageID, const WebCore::ResourceRequest&); |
andersca@apple.com | 09c7e62 | 2010-11-29 23:34:17 +0000 | [diff] [blame] | 273 | void cancelDownload(uint64_t downloadID); |
commit-queue@webkit.org | 2873158 | 2011-11-03 13:05:25 +0000 | [diff] [blame] | 274 | #if PLATFORM(QT) |
| 275 | void startTransfer(uint64_t downloadID, const String& destination); |
| 276 | #endif |
andersca@apple.com | 09c7e62 | 2010-11-29 23:34:17 +0000 | [diff] [blame] | 277 | |
andersca@apple.com | 190ba93 | 2011-01-04 22:41:52 +0000 | [diff] [blame] | 278 | void setTextCheckerState(const TextCheckerState&); |
adachan@apple.com | e51a25a | 2011-08-30 22:09:21 +0000 | [diff] [blame] | 279 | |
| 280 | void getWebCoreStatistics(uint64_t callbackID); |
commit-queue@webkit.org | 536245c | 2011-09-03 01:20:49 +0000 | [diff] [blame] | 281 | void garbageCollectJavaScriptObjects(); |
msaboff@apple.com | fb5f4cc | 2012-05-14 23:47:53 +0000 | [diff] [blame] | 282 | void setJavaScriptGarbageCollectorTimerEnabled(bool flag); |
andersca@apple.com | 190ba93 | 2011-01-04 22:41:52 +0000 | [diff] [blame] | 283 | |
andersca@apple.com | 0214d83 | 2012-10-12 00:56:10 +0000 | [diff] [blame] | 284 | void postInjectedBundleMessage(const CoreIPC::DataReference& messageData); |
| 285 | |
aestes@apple.com | 1c4d833 | 2012-06-03 02:46:11 +0000 | [diff] [blame] | 286 | #if USE(SECURITY_FRAMEWORK) |
andersca@apple.com | 222a631 | 2012-01-10 22:50:51 +0000 | [diff] [blame] | 287 | void secItemResponse(CoreIPC::Connection*, uint64_t requestID, const SecItemResponseData&); |
andersca@apple.com | 222a631 | 2012-01-10 22:50:51 +0000 | [diff] [blame] | 288 | #endif |
| 289 | |
andersca@apple.com | c31f8d2 | 2011-04-13 21:29:36 +0000 | [diff] [blame] | 290 | // ChildProcess |
| 291 | virtual bool shouldTerminate(); |
andersca@apple.com | 5fe589e | 2011-04-13 22:24:28 +0000 | [diff] [blame] | 292 | virtual void terminate(); |
andersca@apple.com | c31f8d2 | 2011-04-13 21:29:36 +0000 | [diff] [blame] | 293 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 294 | // CoreIPC::Connection::Client |
weinig@apple.com | 5e61b0c | 2011-12-05 18:41:53 +0000 | [diff] [blame] | 295 | friend class WebConnectionToUIProcess; |
andersca@apple.com | f66b7ca | 2012-10-18 21:33:56 +0000 | [diff] [blame] | 296 | virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&); |
| 297 | virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&); |
andersca@apple.com | 38ac474 | 2011-04-19 21:16:45 +0000 | [diff] [blame] | 298 | virtual void didClose(CoreIPC::Connection*); |
andersca@apple.com | 8e5f9bb | 2012-10-31 17:36:38 +0000 | [diff] [blame] | 299 | virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE; |
weinig@apple.com | 5e61b0c | 2011-12-05 18:41:53 +0000 | [diff] [blame] | 300 | #if PLATFORM(WIN) |
| 301 | virtual Vector<HWND> windowsToReceiveSentMessagesWhileWaitingForSyncReply(); |
| 302 | #endif |
andersca@apple.com | 38ac474 | 2011-04-19 21:16:45 +0000 | [diff] [blame] | 303 | |
andersca@apple.com | 91cacbf | 2011-05-03 01:19:07 +0000 | [diff] [blame] | 304 | // CoreIPC::Connection::QueueClient |
andersca@apple.com | f66b7ca | 2012-10-18 21:33:56 +0000 | [diff] [blame] | 305 | virtual void didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, bool& didHandleMessage) OVERRIDE; |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 306 | |
weinig@apple.com | d498210 | 2010-10-04 20:06:49 +0000 | [diff] [blame] | 307 | // Implemented in generated WebProcessMessageReceiver.cpp |
andersca@apple.com | f66b7ca | 2012-10-18 21:33:56 +0000 | [diff] [blame] | 308 | void didReceiveWebProcessMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&); |
| 309 | void didReceiveWebProcessMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&, bool& didHandleMessage); |
andersca@apple.com | 91cacbf | 2011-05-03 01:19:07 +0000 | [diff] [blame] | 310 | |
commit-queue@webkit.org | 0846219 | 2012-10-19 02:43:49 +0000 | [diff] [blame] | 311 | #if ENABLE(NETSCAPE_PLUGIN_API) |
kling@webkit.org | 89ef668 | 2012-05-11 19:49:28 +0000 | [diff] [blame] | 312 | void didGetPlugins(CoreIPC::Connection*, uint64_t requestID, const Vector<WebCore::PluginInfo>&); |
commit-queue@webkit.org | 0846219 | 2012-10-19 02:43:49 +0000 | [diff] [blame] | 313 | #endif |
kling@webkit.org | 89ef668 | 2012-05-11 19:49:28 +0000 | [diff] [blame] | 314 | |
aestes@apple.com | 8ebb8c1 | 2012-11-14 23:29:37 +0000 | [diff] [blame] | 315 | #if ENABLE(CUSTOM_PROTOCOLS) |
| 316 | void registerSchemeForCustomProtocol(const WTF::String&); |
| 317 | void unregisterSchemeForCustomProtocol(const WTF::String&); |
| 318 | #endif |
| 319 | |
weinig@apple.com | b59f55f | 2012-11-21 05:23:35 +0000 | [diff] [blame] | 320 | RefPtr<CoreIPC::Connection> m_connection; |
andersca@apple.com | bb2611b | 2012-10-22 22:09:56 +0000 | [diff] [blame] | 321 | CoreIPC::MessageReceiverMap m_messageReceiverMap; |
weinig@apple.com | 5e61b0c | 2011-12-05 18:41:53 +0000 | [diff] [blame] | 322 | |
weinig@apple.com | b59f55f | 2012-11-21 05:23:35 +0000 | [diff] [blame] | 323 | RefPtr<WebConnectionToUIProcess> m_webConnection; |
| 324 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 325 | HashMap<uint64_t, RefPtr<WebPage> > m_pageMap; |
weinig@apple.com | 40a04ca | 2010-12-01 22:00:01 +0000 | [diff] [blame] | 326 | HashMap<uint64_t, RefPtr<WebPageGroupProxy> > m_pageGroupMap; |
weinig@apple.com | c46f421 | 2010-06-15 23:17:21 +0000 | [diff] [blame] | 327 | RefPtr<InjectedBundle> m_injectedBundle; |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 328 | |
jberlin@webkit.org | a163d3e | 2011-12-13 00:52:46 +0000 | [diff] [blame] | 329 | EventDispatcher m_eventDispatcher; |
| 330 | |
weinig@apple.com | 5feed4a | 2010-04-13 23:51:17 +0000 | [diff] [blame] | 331 | bool m_inDidClose; |
| 332 | |
weinig@apple.com | fa21959 | 2012-01-20 03:04:51 +0000 | [diff] [blame] | 333 | WebCore::RunLoop* m_runLoop; |
simon.fraser@apple.com | d5cafa9 | 2010-07-01 23:26:00 +0000 | [diff] [blame] | 334 | |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 335 | // FIXME: The visited link table should not be per process. |
| 336 | VisitedLinkTable m_visitedLinkTable; |
abecsi@webkit.org | d14cfc4 | 2012-05-16 09:58:59 +0000 | [diff] [blame] | 337 | bool m_shouldTrackVisitedLinks; |
andersca@apple.com | 741ac22 | 2010-08-06 00:00:45 +0000 | [diff] [blame] | 338 | |
jonlee@apple.com | f494c4f | 2012-12-11 01:33:15 +0000 | [diff] [blame] | 339 | HashSet<unsigned> m_plugInAutoStartOrigins; |
| 340 | |
weinig@apple.com | 47a1504 | 2010-10-04 17:15:41 +0000 | [diff] [blame] | 341 | bool m_hasSetCacheModel; |
| 342 | CacheModel m_cacheModel; |
| 343 | |
simon.fraser@apple.com | d5cafa9 | 2010-07-01 23:26:00 +0000 | [diff] [blame] | 344 | #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC) |
| 345 | mach_port_t m_compositingRenderServerPort; |
| 346 | #endif |
cfleizach@apple.com | aa50410 | 2011-01-05 01:07:44 +0000 | [diff] [blame] | 347 | #if PLATFORM(MAC) |
| 348 | pid_t m_presenterApplicationPid; |
kling@webkit.org | df242ce | 2012-04-23 22:52:13 +0000 | [diff] [blame] | 349 | dispatch_group_t m_clearResourceCachesDispatchGroup; |
mitz@apple.com | d2d65b9 | 2012-09-26 05:13:21 +0000 | [diff] [blame] | 350 | bool m_shouldForceScreenFontSubstitution; |
cfleizach@apple.com | aa50410 | 2011-01-05 01:07:44 +0000 | [diff] [blame] | 351 | #endif |
ap@apple.com | e10b7ae | 2010-08-26 23:03:26 +0000 | [diff] [blame] | 352 | |
ap@apple.com | 20e8427 | 2011-11-07 22:51:59 +0000 | [diff] [blame] | 353 | bool m_fullKeyboardAccessEnabled; |
| 354 | |
jocelyn.turcotte@nokia.com | 36e9e69 | 2010-12-10 03:36:23 +0000 | [diff] [blame] | 355 | #if PLATFORM(QT) |
| 356 | QNetworkAccessManager* m_networkAccessManager; |
| 357 | #endif |
| 358 | |
ap@apple.com | e10b7ae | 2010-08-26 23:03:26 +0000 | [diff] [blame] | 359 | HashMap<uint64_t, WebFrame*> m_frameMap; |
andersca@apple.com | 481efa3 | 2010-12-09 18:37:30 +0000 | [diff] [blame] | 360 | |
commit-queue@webkit.org | 6ff3153 | 2012-08-15 13:03:19 +0000 | [diff] [blame] | 361 | #if ENABLE(WEB_INTENTS) |
| 362 | HashMap<uint64_t, RefPtr<WebCore::PlatformMessagePortChannel> > m_messagePortChannels; |
| 363 | #endif |
| 364 | |
andersca@apple.com | 190ba93 | 2011-01-04 22:41:52 +0000 | [diff] [blame] | 365 | TextCheckerState m_textCheckerState; |
weinig@apple.com | 4201e96 | 2011-01-10 19:20:15 +0000 | [diff] [blame] | 366 | WebGeolocationManager m_geolocationManager; |
commit-queue@webkit.org | 3c26088 | 2012-07-03 23:31:49 +0000 | [diff] [blame] | 367 | #if ENABLE(BATTERY_STATUS) |
| 368 | WebBatteryManager m_batteryManager; |
| 369 | #endif |
commit-queue@webkit.org | a87fcb4 | 2012-07-06 19:12:12 +0000 | [diff] [blame] | 370 | #if ENABLE(NETWORK_INFO) |
| 371 | WebNetworkInfoManager m_networkInfoManager; |
| 372 | #endif |
jonlee@apple.com | ed78cdb | 2012-03-14 23:41:04 +0000 | [diff] [blame] | 373 | #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
jonlee@apple.com | 6c09545 | 2011-11-29 01:08:35 +0000 | [diff] [blame] | 374 | WebNotificationManager m_notificationManager; |
| 375 | #endif |
beidson@apple.com | 3f10cc6 | 2011-03-16 02:15:52 +0000 | [diff] [blame] | 376 | WebIconDatabaseProxy m_iconDatabaseProxy; |
beidson@apple.com | 0e810aa | 2011-03-14 05:47:55 +0000 | [diff] [blame] | 377 | |
| 378 | String m_localStorageDirectory; |
andersca@apple.com | 004d4ce | 2011-04-29 19:12:02 +0000 | [diff] [blame] | 379 | |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 380 | #if ENABLE(NETWORK_PROCESS) |
| 381 | void ensureNetworkProcessConnection(); |
| 382 | RefPtr<NetworkProcessConnection> m_networkProcessConnection; |
beidson@apple.com | e039bb3 | 2012-10-20 00:00:19 +0000 | [diff] [blame] | 383 | bool m_usesNetworkProcess; |
beidson@apple.com | 3378556 | 2012-10-25 17:16:38 +0000 | [diff] [blame] | 384 | WebResourceLoadScheduler m_webResourceLoadScheduler; |
beidson@apple.com | dfbdf94 | 2012-10-19 23:26:16 +0000 | [diff] [blame] | 385 | #endif |
| 386 | |
andersca@apple.com | 70c2c20 | 2011-05-03 00:53:03 +0000 | [diff] [blame] | 387 | #if ENABLE(PLUGIN_PROCESS) |
| 388 | PluginProcessConnectionManager m_pluginProcessConnectionManager; |
| 389 | #endif |
andersca@apple.com | 1558212 | 2011-08-09 21:52:55 +0000 | [diff] [blame] | 390 | |
carlosgc@webkit.org | 5d9808b | 2012-04-27 07:13:40 +0000 | [diff] [blame] | 391 | #if USE(SOUP) |
| 392 | WebSoupRequestManager m_soupRequestManager; |
| 393 | #endif |
| 394 | |
weinig@apple.com | d773bc1 | 2010-04-09 00:49:12 +0000 | [diff] [blame] | 395 | }; |
| 396 | |
| 397 | } // namespace WebKit |
| 398 | |
| 399 | #endif // WebProcess_h |