OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "content/public/common/content_constants.h" | 48 #include "content/public/common/content_constants.h" |
49 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
50 #include "content/public/common/context_menu_params.h" | 50 #include "content/public/common/context_menu_params.h" |
51 #include "content/public/common/file_chooser_params.h" | 51 #include "content/public/common/file_chooser_params.h" |
52 #include "content/public/common/url_constants.h" | 52 #include "content/public/common/url_constants.h" |
53 #include "content/public/renderer/content_renderer_client.h" | 53 #include "content/public/renderer/content_renderer_client.h" |
54 #include "content/public/renderer/document_state.h" | 54 #include "content/public/renderer/document_state.h" |
55 #include "content/public/renderer/navigation_state.h" | 55 #include "content/public/renderer/navigation_state.h" |
56 #include "content/public/renderer/render_view_observer.h" | 56 #include "content/public/renderer/render_view_observer.h" |
57 #include "content/public/renderer/render_view_visitor.h" | 57 #include "content/public/renderer/render_view_visitor.h" |
58 #include "content/renderer/browser_plugin/browser_plugin.h" | |
59 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | |
60 #include "content/renderer/browser_plugin/old/old_browser_plugin.h" | 58 #include "content/renderer/browser_plugin/old/old_browser_plugin.h" |
61 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" | 59 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" |
62 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" | 60 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" |
63 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" | 61 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" |
64 #include "content/renderer/device_orientation_dispatcher.h" | 62 #include "content/renderer/device_orientation_dispatcher.h" |
65 #include "content/renderer/devtools_agent.h" | 63 #include "content/renderer/devtools_agent.h" |
66 #include "content/renderer/dom_automation_controller.h" | 64 #include "content/renderer/dom_automation_controller.h" |
67 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 65 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
68 #include "content/renderer/external_popup_menu.h" | 66 #include "content/renderer/external_popup_menu.h" |
69 #include "content/renderer/geolocation_dispatcher.h" | 67 #include "content/renderer/geolocation_dispatcher.h" |
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 // WebKit::WebFrameClient ----------------------------------------------------- | 2310 // WebKit::WebFrameClient ----------------------------------------------------- |
2313 | 2311 |
2314 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2312 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
2315 const WebPluginParams& params) { | 2313 const WebPluginParams& params) { |
2316 WebPlugin* plugin = NULL; | 2314 WebPlugin* plugin = NULL; |
2317 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( | 2315 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( |
2318 this, frame, params, &plugin)) { | 2316 this, frame, params, &plugin)) { |
2319 return plugin; | 2317 return plugin; |
2320 } | 2318 } |
2321 | 2319 |
2322 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin is | |
2323 // complete. | |
2324 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginNewMimeType) { | |
2325 return content::BrowserPluginManager::Get()-> | |
2326 CreateBrowserPlugin(this, frame, params); | |
2327 } | |
2328 | |
2329 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) | 2320 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) |
2330 return content::old::BrowserPlugin::Create(this, frame, params); | 2321 return content::old::BrowserPlugin::Create(this, frame, params); |
2331 | 2322 |
2332 webkit::WebPluginInfo info; | 2323 webkit::WebPluginInfo info; |
2333 std::string mime_type; | 2324 std::string mime_type; |
2334 bool found = GetPluginInfo(params.url, frame->top()->document().url(), | 2325 bool found = GetPluginInfo(params.url, frame->top()->document().url(), |
2335 params.mimeType.utf8(), &info, &mime_type); | 2326 params.mimeType.utf8(), &info, &mime_type); |
2336 if (!found) | 2327 if (!found) |
2337 return NULL; | 2328 return NULL; |
2338 | 2329 |
(...skipping 3445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5784 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5775 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5785 return !!RenderThreadImpl::current()->compositor_thread(); | 5776 return !!RenderThreadImpl::current()->compositor_thread(); |
5786 } | 5777 } |
5787 | 5778 |
5788 void RenderViewImpl::OnJavaBridgeInit() { | 5779 void RenderViewImpl::OnJavaBridgeInit() { |
5789 DCHECK(!java_bridge_dispatcher_); | 5780 DCHECK(!java_bridge_dispatcher_); |
5790 #if defined(ENABLE_JAVA_BRIDGE) | 5781 #if defined(ENABLE_JAVA_BRIDGE) |
5791 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5782 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5792 #endif | 5783 #endif |
5793 } | 5784 } |
OLD | NEW |