Changeset 69614 in webkit
- Timestamp:
- Oct 12, 2010 3:37:49 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r69604 r69614 1 2010-10-12 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Jon Honeycutt. 4 5 Add ability for WK2 to register a scheme as secure. 6 https://bugs.webkit.org/show_bug.cgi?id=47557 7 8 Add the schemes that need to be registered as secure to the WebProcessCreationParameters. 9 * Shared/WebProcessCreationParameters.cpp: 10 (WebKit::WebProcessCreationParameters::encode): 11 (WebKit::WebProcessCreationParameters::decode): 12 * Shared/WebProcessCreationParameters.h: 13 14 * UIProcess/API/C/WKContext.cpp: 15 (WKContextRegisterURLSchemeAsSecure): 16 * UIProcess/API/C/WKContextPrivate.h: 17 18 * UIProcess/WebContext.cpp: 19 (WebKit::WebContext::ensureWebProcess): 20 Copy over the schemes that are to be registered as secure to the 21 WebProcessCreationParameters. 22 (WebKit::WebContext::registerURLSchemeAsSecure): 23 Only send a message to the WebProcess if it is valid. 24 * UIProcess/WebContext.h: 25 26 * WebProcess/WebProcess.cpp: 27 (WebKit::WebProcess::initializeWebProcess): 28 Register the schemes that need to be registered as secure from the 29 WebProcessCreationParameters. 30 (WebKit::WebProcess::registerURLSchemeAsSecure): 31 * WebProcess/WebProcess.h: 32 33 * WebProcess/WebProcess.messages.in: 34 Add the RegisterURLSchemeAsSecure message. 35 1 36 2010-10-12 John Sullivan <sullivan@apple.com> 2 37 -
trunk/WebKit2/Shared/WebProcessCreationParameters.cpp
r69037 r69614 47 47 encoder->encode(applicationCacheDirectory); 48 48 encoder->encode(urlSchemesRegistererdAsEmptyDocument); 49 encoder->encode(urlSchemesRegisteredAsSecure); 49 50 encoder->encode(static_cast<uint32_t>(cacheModel)); 50 51 encoder->encode(shouldTrackVisitedLinks); … … 70 71 if (!decoder->decode(parameters.urlSchemesRegistererdAsEmptyDocument)) 71 72 return false; 73 if (!decoder->decode(parameters.urlSchemesRegisteredAsSecure)) 74 return false; 72 75 73 76 uint32_t cacheModel; -
trunk/WebKit2/Shared/WebProcessCreationParameters.h
r69037 r69614 55 55 String applicationCacheDirectory; 56 56 Vector<String> urlSchemesRegistererdAsEmptyDocument; 57 Vector<String> urlSchemesRegisteredAsSecure; 57 58 58 59 CacheModel cacheModel; -
trunk/WebKit2/UIProcess/API/C/WKContext.cpp
r69214 r69614 121 121 toImpl(contextRef)->registerURLSchemeAsEmptyDocument(toImpl(urlScheme)->string()); 122 122 } 123 124 void WKContextRegisterURLSchemeAsSecure(WKContextRef contextRef, WKStringRef urlScheme) 125 { 126 toImpl(contextRef)->registerURLSchemeAsSecure(toImpl(urlScheme)->string()); 127 } -
trunk/WebKit2/UIProcess/API/C/WKContextPrivate.h
r64287 r69614 49 49 WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme); 50 50 51 WK_EXPORT void WKContextRegisterURLSchemeAsSecure(WKContextRef context, WKStringRef urlScheme); 52 51 53 #ifdef __cplusplus 52 54 } -
trunk/WebKit2/UIProcess/WebContext.cpp
r69056 r69614 153 153 154 154 copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument); 155 copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure); 155 156 156 157 // Add any platform specific parameters … … 309 310 310 311 m_process->send(Messages::WebProcess::RegisterURLSchemeAsEmptyDocument(urlScheme), 0); 312 } 313 314 void WebContext::registerURLSchemeAsSecure(const String& urlScheme) 315 { 316 m_schemesToRegisterAsSecure.add(urlScheme); 317 318 if (!hasValidProcess()) 319 return; 320 321 m_process->send(Messages::WebProcess::RegisterURLSchemeAsSecure(urlScheme), 0); 311 322 } 312 323 -
trunk/WebKit2/UIProcess/WebContext.h
r69240 r69614 103 103 104 104 void registerURLSchemeAsEmptyDocument(const String&); 105 void registerURLSchemeAsSecure(const String&); 105 106 106 107 void addVisitedLink(const String&); … … 143 144 144 145 HashSet<String> m_schemesToRegisterAsEmptyDocument; 146 HashSet<String> m_schemesToRegisterAsSecure; 145 147 Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle; 146 148 -
trunk/WebKit2/WebProcess/WebProcess.cpp
r69503 r69614 133 133 setShouldTrackVisitedLinks(parameters.shouldTrackVisitedLinks); 134 134 setCacheModel(static_cast<uint32_t>(parameters.cacheModel)); 135 135 136 for (size_t i = 0; i < parameters.urlSchemesRegistererdAsEmptyDocument.size(); ++i) 136 137 registerURLSchemeAsEmptyDocument(parameters.urlSchemesRegistererdAsEmptyDocument[i]); 137 138 139 for (size_t i = 0; i < parameters.urlSchemesRegisteredAsSecure.size(); ++i) 140 registerURLSchemeAsSecure(parameters.urlSchemesRegisteredAsSecure[i]); 141 138 142 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC) 139 143 m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port(); … … 152 156 { 153 157 SchemeRegistry::registerURLSchemeAsEmptyDocument(urlScheme); 158 } 159 160 void WebProcess::registerURLSchemeAsSecure(const String& urlScheme) const 161 { 162 SchemeRegistry::registerURLSchemeAsSecure(urlScheme); 154 163 } 155 164 -
trunk/WebKit2/WebProcess/WebProcess.h
r69037 r69614 91 91 void setShouldTrackVisitedLinks(bool); 92 92 void registerURLSchemeAsEmptyDocument(const String&); 93 void registerURLSchemeAsSecure(const String&) const; 93 94 #if PLATFORM(WIN) 94 95 void setShouldPaintNativeControls(bool); -
trunk/WebKit2/WebProcess/WebProcess.messages.in
r69037 r69614 37 37 SetCacheModel(uint32_t cacheModel) 38 38 RegisterURLSchemeAsEmptyDocument(WTF::String scheme) 39 RegisterURLSchemeAsSecure(WTF::String scheme) 39 40 #if PLATFORM(WIN) 40 41 SetShouldPaintNativeControls(bool shouldPaintNativeControls)
Note: See TracChangeset
for help on using the changeset viewer.