| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "content/renderer/media/media_stream_dispatcher.h" | 66 #include "content/renderer/media/media_stream_dispatcher.h" |
| 67 #include "content/renderer/media/media_stream_impl.h" | 67 #include "content/renderer/media/media_stream_impl.h" |
| 68 #include "content/renderer/media/render_audiosourceprovider.h" | 68 #include "content/renderer/media/render_audiosourceprovider.h" |
| 69 #include "content/renderer/media/render_media_log.h" | 69 #include "content/renderer/media/render_media_log.h" |
| 70 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" | 70 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" |
| 71 #include "content/renderer/mhtml_generator.h" | 71 #include "content/renderer/mhtml_generator.h" |
| 72 #include "content/renderer/mouse_lock_dispatcher.h" | 72 #include "content/renderer/mouse_lock_dispatcher.h" |
| 73 #include "content/renderer/notification_provider.h" | 73 #include "content/renderer/notification_provider.h" |
| 74 #include "content/renderer/p2p/socket_dispatcher.h" | 74 #include "content/renderer/p2p/socket_dispatcher.h" |
| 75 #include "content/renderer/plugin_channel_host.h" | 75 #include "content/renderer/plugin_channel_host.h" |
| 76 #include "content/renderer/browser_plugin/browser_plugin_constants.h" |
| 77 #include "content/renderer/browser_plugin/browser_plugin_placeholder.h" |
| 76 #include "content/renderer/render_process.h" | 78 #include "content/renderer/render_process.h" |
| 77 #include "content/renderer/render_thread_impl.h" | 79 #include "content/renderer/render_thread_impl.h" |
| 78 #include "content/renderer/render_widget_fullscreen_pepper.h" | 80 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 79 #include "content/renderer/renderer_accessibility.h" | 81 #include "content/renderer/renderer_accessibility.h" |
| 80 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 82 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
| 81 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 83 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
| 82 #include "content/renderer/text_input_client_observer.h" | 84 #include "content/renderer/text_input_client_observer.h" |
| 83 #include "content/renderer/v8_value_converter_impl.h" | 85 #include "content/renderer/v8_value_converter_impl.h" |
| 84 #include "content/renderer/web_intents_host.h" | 86 #include "content/renderer/web_intents_host.h" |
| 85 #include "content/renderer/web_ui_bindings.h" | 87 #include "content/renderer/web_ui_bindings.h" |
| (...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 | 2061 |
| 2060 bool RenderViewImpl::isPointerLocked() { | 2062 bool RenderViewImpl::isPointerLocked() { |
| 2061 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2063 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2062 webwidget_mouse_lock_target_.get()); | 2064 webwidget_mouse_lock_target_.get()); |
| 2063 } | 2065 } |
| 2064 | 2066 |
| 2065 // WebKit::WebFrameClient ----------------------------------------------------- | 2067 // WebKit::WebFrameClient ----------------------------------------------------- |
| 2066 | 2068 |
| 2067 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2069 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
| 2068 const WebPluginParams& params) { | 2070 const WebPluginParams& params) { |
| 2071 // The browser plugin is a special kind of pepper plugin |
| 2072 // that loads asynchronously. We first create a placeholder here. |
| 2073 // When a guest is ready to be displayed, we swap out the placeholder |
| 2074 // with the guest. |
| 2075 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 2076 if (command_line.HasSwitch(switches::kEnableBrowserPlugin) && |
| 2077 UTF16ToASCII(params.mimeType) == kBrowserPluginMimeType) |
| 2078 return BrowserPluginPlaceholder::Create(this, frame, params); |
| 2079 |
| 2069 WebPlugin* plugin = NULL; | 2080 WebPlugin* plugin = NULL; |
| 2070 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( | 2081 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( |
| 2071 this, frame, params, &plugin)) { | 2082 this, frame, params, &plugin)) { |
| 2072 return plugin; | 2083 return plugin; |
| 2073 } | 2084 } |
| 2074 | 2085 |
| 2075 webkit::WebPluginInfo info; | 2086 webkit::WebPluginInfo info; |
| 2076 std::string mime_type; | 2087 std::string mime_type; |
| 2077 bool found = GetPluginInfo(params.url, frame->top()->document().url(), | 2088 bool found = GetPluginInfo(params.url, frame->top()->document().url(), |
| 2078 params.mimeType.utf8(), &info, &mime_type); | 2089 params.mimeType.utf8(), &info, &mime_type); |
| (...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5130 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5141 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5131 return !!RenderThreadImpl::current()->compositor_thread(); | 5142 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5132 } | 5143 } |
| 5133 | 5144 |
| 5134 void RenderViewImpl::OnJavaBridgeInit() { | 5145 void RenderViewImpl::OnJavaBridgeInit() { |
| 5135 DCHECK(!java_bridge_dispatcher_.get()); | 5146 DCHECK(!java_bridge_dispatcher_.get()); |
| 5136 #if defined(ENABLE_JAVA_BRIDGE) | 5147 #if defined(ENABLE_JAVA_BRIDGE) |
| 5137 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5148 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5138 #endif | 5149 #endif |
| 5139 } | 5150 } |
| OLD | NEW |