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 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2063 | 2063 |
2064 void RenderViewImpl::requestPointerUnlock() { | 2064 void RenderViewImpl::requestPointerUnlock() { |
2065 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2065 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
2066 } | 2066 } |
2067 | 2067 |
2068 bool RenderViewImpl::isPointerLocked() { | 2068 bool RenderViewImpl::isPointerLocked() { |
2069 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2069 return mouse_lock_dispatcher_->IsMouseLockedTo( |
2070 webwidget_mouse_lock_target_.get()); | 2070 webwidget_mouse_lock_target_.get()); |
2071 } | 2071 } |
2072 | 2072 |
2073 void RenderViewImpl::didActivateCompositor(int input_handler_identifier) | |
2074 { | |
darin (slow to review)
2012/03/27 03:47:54
nit: opening bracket on previous line
| |
2075 CompositorThread* compositor_thread = | |
2076 RenderThreadImpl::current()->compositor_thread(); | |
2077 if (compositor_thread) | |
2078 compositor_thread->AddInputHandler( | |
2079 routing_id_, input_handler_identifier, AsWeakPtr()); | |
2080 | |
2081 RenderWidget::didActivateCompositor(input_handler_identifier); | |
2082 } | |
2083 | |
2073 // WebKit::WebFrameClient ----------------------------------------------------- | 2084 // WebKit::WebFrameClient ----------------------------------------------------- |
2074 | 2085 |
2075 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2086 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
2076 const WebPluginParams& params) { | 2087 const WebPluginParams& params) { |
2077 // The browser plugin is a special kind of pepper plugin | 2088 // The browser plugin is a special kind of pepper plugin |
2078 // that loads asynchronously. We first create a placeholder here. | 2089 // that loads asynchronously. We first create a placeholder here. |
2079 // When a guest is ready to be displayed, we swap out the placeholder | 2090 // When a guest is ready to be displayed, we swap out the placeholder |
2080 // with the guest. | 2091 // with the guest. |
2081 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 2092 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
2082 if (command_line.HasSwitch(switches::kEnableBrowserPlugin) && | 2093 if (command_line.HasSwitch(switches::kEnableBrowserPlugin) && |
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5201 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5212 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5202 return !!RenderThreadImpl::current()->compositor_thread(); | 5213 return !!RenderThreadImpl::current()->compositor_thread(); |
5203 } | 5214 } |
5204 | 5215 |
5205 void RenderViewImpl::OnJavaBridgeInit() { | 5216 void RenderViewImpl::OnJavaBridgeInit() { |
5206 DCHECK(!java_bridge_dispatcher_.get()); | 5217 DCHECK(!java_bridge_dispatcher_.get()); |
5207 #if defined(ENABLE_JAVA_BRIDGE) | 5218 #if defined(ENABLE_JAVA_BRIDGE) |
5208 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5219 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5209 #endif | 5220 #endif |
5210 } | 5221 } |
OLD | NEW |