Chromium Code Reviews| 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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2214 | 2214 |
| 2215 // WebKit::WebFrameClient ----------------------------------------------------- | 2215 // WebKit::WebFrameClient ----------------------------------------------------- |
| 2216 | 2216 |
| 2217 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2217 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
| 2218 const WebPluginParams& params) { | 2218 const WebPluginParams& params) { |
| 2219 WebPlugin* plugin = NULL; | 2219 WebPlugin* plugin = NULL; |
| 2220 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( | 2220 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( |
| 2221 this, frame, params, &plugin)) { | 2221 this, frame, params, &plugin)) { |
| 2222 return plugin; | 2222 return plugin; |
| 2223 } | 2223 } |
| 2224 | |
| 2224 // Check only that the browser plugin isn't disabled. The client layer | 2225 // Check only that the browser plugin isn't disabled. The client layer |
| 2225 // may have provided additional selective enabling of the plugin, and | 2226 // may have provided additional selective enabling of the plugin, and |
| 2226 // so we can't assume that 'enabled' is the only state where it should | 2227 // so we can't assume that 'enabled' is the only state where it should |
| 2227 // be activated. If it isn't, then the client layer should have caught | 2228 // be activated. If it isn't, then the client layer should have caught |
| 2228 // this in OverrideCreatePlugin already. | 2229 // this in OverrideCreatePlugin already. |
| 2229 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) | 2230 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) |
| 2230 return RenderThreadImpl::current()->browser_plugin_manager()-> | 2231 return RenderThreadImpl::current()->browser_plugin_manager()-> |
| 2231 CreateBrowserPlugin(this, frame, params); | 2232 CreateBrowserPlugin(this, frame, params); |
| 2232 | 2233 |
| 2233 webkit::WebPluginInfo info; | 2234 webkit::WebPluginInfo info; |
| (...skipping 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4868 } | 4869 } |
| 4869 UpdateScrollState(webview()->mainFrame()); | 4870 UpdateScrollState(webview()->mainFrame()); |
| 4870 } | 4871 } |
| 4871 | 4872 |
| 4872 RenderWidget::OnResize(new_size, resizer_rect, is_fullscreen); | 4873 RenderWidget::OnResize(new_size, resizer_rect, is_fullscreen); |
| 4873 } | 4874 } |
| 4874 | 4875 |
| 4875 void RenderViewImpl::WillInitiatePaint() { | 4876 void RenderViewImpl::WillInitiatePaint() { |
| 4876 // Notify the pepper plugins that we're about to paint. | 4877 // Notify the pepper plugins that we're about to paint. |
| 4877 pepper_delegate_.ViewWillInitiatePaint(); | 4878 pepper_delegate_.ViewWillInitiatePaint(); |
| 4879 RenderThreadImpl::current()->browser_plugin_manager()->WillInitiatePaint(); | |
|
scshunt
2012/07/06 16:39:03
This is where the call is added.
| |
| 4878 } | 4880 } |
| 4879 | 4881 |
| 4880 void RenderViewImpl::DidInitiatePaint() { | 4882 void RenderViewImpl::DidInitiatePaint() { |
| 4881 // Notify the pepper plugins that we've painted, and are waiting to flush. | 4883 // Notify the pepper plugins that we've painted, and are waiting to flush. |
| 4882 pepper_delegate_.ViewInitiatedPaint(); | 4884 pepper_delegate_.ViewInitiatedPaint(); |
| 4883 } | 4885 } |
| 4884 | 4886 |
| 4885 void RenderViewImpl::DidFlushPaint() { | 4887 void RenderViewImpl::DidFlushPaint() { |
| 4886 // Notify any pepper plugins that we painted. This will call into the plugin, | 4888 // Notify any pepper plugins that we painted. This will call into the plugin, |
| 4887 // and we it may ask to close itself as a result. This will, in turn, modify | 4889 // and we it may ask to close itself as a result. This will, in turn, modify |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5599 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5601 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5600 return !!RenderThreadImpl::current()->compositor_thread(); | 5602 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5601 } | 5603 } |
| 5602 | 5604 |
| 5603 void RenderViewImpl::OnJavaBridgeInit() { | 5605 void RenderViewImpl::OnJavaBridgeInit() { |
| 5604 DCHECK(!java_bridge_dispatcher_); | 5606 DCHECK(!java_bridge_dispatcher_); |
| 5605 #if defined(ENABLE_JAVA_BRIDGE) | 5607 #if defined(ENABLE_JAVA_BRIDGE) |
| 5606 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5608 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5607 #endif | 5609 #endif |
| 5608 } | 5610 } |
| OLD | NEW |