Changeset 62824 in webkit
- Timestamp:
- Jul 8, 2010 1:14:46 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r62823 r62824 1 2010-07-08 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add a GetPluginHostConnection WebProcessProxy message 6 https://bugs.webkit.org/show_bug.cgi?id=41893 7 8 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h: 9 (WebProcessProxyMessage::): 10 * UIProcess/WebProcessProxy.cpp: 11 (WebKit::WebProcessProxy::getPluginHostConnection): 12 (WebKit::WebProcessProxy::didReceiveMessage): 13 (WebKit::WebProcessProxy::didReceiveSyncMessage): 14 * UIProcess/WebProcessProxy.h: 15 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 16 (WebKit::WebFrameLoaderClient::createPlugin): 17 1 18 2010-07-08 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/WebKit2/Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h
r61725 r62824 35 35 enum Kind { 36 36 PostMessage, 37 GetPlugins 37 GetPlugins, 38 GetPluginHostConnection 38 39 }; 39 40 -
trunk/WebKit2/UIProcess/WebProcessProxy.cpp
r62320 r62824 34 34 #include "WebProcessMessageKinds.h" 35 35 #include "WebProcessProxyMessageKinds.h" 36 #include <WebCore/KURL.h> 36 37 #include <WebCore/PlatformString.h> 37 38 … … 166 167 PluginInfoStore::shared().refresh(); 167 168 PluginInfoStore::shared().getPlugins(plugins); 169 } 170 171 void WebProcessProxy::getPluginHostConnection(const String& mimeType, const KURL& url, WebCore::String& pluginPath) 172 { 173 String newMimeType = mimeType.lower(); 174 175 PluginInfoStore::Plugin plugin = PluginInfoStore::shared().findPlugin(newMimeType, url); 176 if (!plugin.path) 177 return; 178 179 pluginPath = plugin.path; 168 180 } 169 181 … … 183 195 // These are synchronous messages and should never be handled here. 184 196 case WebProcessProxyMessage::GetPlugins: 197 case WebProcessProxyMessage::GetPluginHostConnection: 185 198 ASSERT_NOT_REACHED(); 186 199 break; … … 216 229 } 217 230 231 case WebProcessProxyMessage::GetPluginHostConnection: { 232 #if PLATFORM(MAC) 233 String mimeType; 234 String urlString; 235 236 if (!arguments->decode(CoreIPC::Out(mimeType, urlString))) 237 return; 238 239 String pluginPath; 240 getPluginHostConnection(mimeType, KURL(ParsedURLString, urlString), pluginPath); 241 reply->encode(CoreIPC::In(pluginPath)); 242 #endif 243 break; 244 } 245 218 246 // These are asynchronous messages and should never be handled here. 219 247 case WebProcessProxyMessage::PostMessage: -
trunk/WebKit2/UIProcess/WebProcessProxy.h
r62320 r62824 38 38 39 39 namespace WebCore { 40 class KURL; 40 41 class String; 41 42 }; … … 93 94 void forwardMessageToWebContext(const WebCore::String&); 94 95 void getPlugins(bool refresh, Vector<WebCore::PluginInfo>&); 95 96 void getPluginHostConnection(const WebCore::String& mimeType, const WebCore::KURL& url, WebCore::String& pluginPath); 97 96 98 // CoreIPC::Connection::Client 97 99 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r62823 r62824 35 35 #include "WebPage.h" 36 36 #include "WebPageProxyMessageKinds.h" 37 #include "WebProcessProxyMessageKinds.h" 37 38 #include "WebProcess.h" 38 39 #include <JavaScriptCore/APICast.h> … … 767 768 PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 768 769 { 769 notImplemented(); 770 770 String pluginPath; 771 772 // FIXME: In the future, this should return a real CoreIPC connection to the plug-in host, but for now we just 773 // return the path and load the plug-in in the web process. 774 if (!WebProcess::shared().connection()->sendSync(WebProcessProxyMessage::GetPluginHostConnection, 0, 775 CoreIPC::In(mimeType, url.string()), 776 CoreIPC::Out(pluginPath), 777 CoreIPC::Connection::NoTimeout)) 778 return 0; 779 780 if (pluginPath.isNull()) 781 return 0; 782 783 // FIXME: Use the plug-in path. 784 771 785 RefPtr<Plugin> plugin = DummyPlugin::create(); 772 786 if (!plugin->initialize(url, paramNames, paramValues, mimeType, loadManually))
Note: See TracChangeset
for help on using the changeset viewer.