Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 9802006: Implement active wheel fling transfer via WebCompositorInputHandlerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 const std::string& mime_type, 712 const std::string& mime_type,
713 webkit::WebPluginInfo* plugin_info, 713 webkit::WebPluginInfo* plugin_info,
714 std::string* actual_mime_type) { 714 std::string* actual_mime_type) {
715 bool found = false; 715 bool found = false;
716 Send(new ViewHostMsg_GetPluginInfo( 716 Send(new ViewHostMsg_GetPluginInfo(
717 routing_id_, url, page_url, mime_type, &found, plugin_info, 717 routing_id_, url, page_url, mime_type, &found, plugin_info,
718 actual_mime_type)); 718 actual_mime_type));
719 return found; 719 return found;
720 } 720 }
721 721
722 void RenderViewImpl::TransferActiveWheelFlingAnimation(
723 const WebKit::WebActiveWheelFlingParameters& params) {
724 if (webview())
725 webview()->transferActiveWheelFlingAnimation(params);
726 }
727
722 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { 728 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
723 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; 729 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL;
724 if (main_frame) 730 if (main_frame)
725 content::GetContentClient()->SetActiveURL(main_frame->document().url()); 731 content::GetContentClient()->SetActiveURL(main_frame->document().url());
726 732
727 ObserverListBase<RenderViewObserver>::Iterator it(observers_); 733 ObserverListBase<RenderViewObserver>::Iterator it(observers_);
728 RenderViewObserver* observer; 734 RenderViewObserver* observer;
729 while ((observer = it.GetNext()) != NULL) 735 while ((observer = it.GetNext()) != NULL)
730 if (observer->OnMessageReceived(message)) 736 if (observer->OnMessageReceived(message))
731 return true; 737 return true;
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 2069
2064 void RenderViewImpl::requestPointerUnlock() { 2070 void RenderViewImpl::requestPointerUnlock() {
2065 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2071 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2066 } 2072 }
2067 2073
2068 bool RenderViewImpl::isPointerLocked() { 2074 bool RenderViewImpl::isPointerLocked() {
2069 return mouse_lock_dispatcher_->IsMouseLockedTo( 2075 return mouse_lock_dispatcher_->IsMouseLockedTo(
2070 webwidget_mouse_lock_target_.get()); 2076 webwidget_mouse_lock_target_.get());
2071 } 2077 }
2072 2078
2079 void RenderViewImpl::didActivateCompositor(int input_handler_identifier) {
2080 CompositorThread* compositor_thread =
2081 RenderThreadImpl::current()->compositor_thread();
2082 if (compositor_thread)
2083 compositor_thread->AddInputHandler(
2084 routing_id_, input_handler_identifier, AsWeakPtr());
2085
2086 RenderWidget::didActivateCompositor(input_handler_identifier);
2087 }
2088
2073 // WebKit::WebFrameClient ----------------------------------------------------- 2089 // WebKit::WebFrameClient -----------------------------------------------------
2074 2090
2075 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, 2091 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame,
2076 const WebPluginParams& params) { 2092 const WebPluginParams& params) {
2077 // The browser plugin is a special kind of pepper plugin 2093 // The browser plugin is a special kind of pepper plugin
2078 // that loads asynchronously. We first create a placeholder here. 2094 // that loads asynchronously. We first create a placeholder here.
2079 // When a guest is ready to be displayed, we swap out the placeholder 2095 // When a guest is ready to be displayed, we swap out the placeholder
2080 // with the guest. 2096 // with the guest.
2081 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 2097 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
2082 if (command_line.HasSwitch(switches::kEnableBrowserPlugin) && 2098 if (command_line.HasSwitch(switches::kEnableBrowserPlugin) &&
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
5201 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5217 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5202 return !!RenderThreadImpl::current()->compositor_thread(); 5218 return !!RenderThreadImpl::current()->compositor_thread();
5203 } 5219 }
5204 5220
5205 void RenderViewImpl::OnJavaBridgeInit() { 5221 void RenderViewImpl::OnJavaBridgeInit() {
5206 DCHECK(!java_bridge_dispatcher_.get()); 5222 DCHECK(!java_bridge_dispatcher_.get());
5207 #if defined(ENABLE_JAVA_BRIDGE) 5223 #if defined(ENABLE_JAVA_BRIDGE)
5208 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5224 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5209 #endif 5225 #endif
5210 } 5226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698