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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 15920002: Fix WebView compositor input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid DCHECKs when retrieving process ID Created 7 years, 6 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
« no previous file with comments | « content/browser/android/sync_input_event_filter.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/threading/worker_pool.h" 14 #include "base/threading/worker_pool.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "cc/layers/delegated_renderer_layer.h" 16 #include "cc/layers/delegated_renderer_layer.h"
17 #include "cc/layers/layer.h" 17 #include "cc/layers/layer.h"
18 #include "cc/layers/texture_layer.h" 18 #include "cc/layers/texture_layer.h"
19 #include "cc/output/compositor_frame.h" 19 #include "cc/output/compositor_frame.h"
20 #include "cc/output/compositor_frame_ack.h" 20 #include "cc/output/compositor_frame_ack.h"
21 #include "content/browser/android/content_view_core_impl.h" 21 #include "content/browser/android/content_view_core_impl.h"
22 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
22 #include "content/browser/android/overscroll_glow.h" 23 #include "content/browser/android/overscroll_glow.h"
23 #include "content/browser/gpu/gpu_surface_tracker.h" 24 #include "content/browser/gpu/gpu_surface_tracker.h"
24 #include "content/browser/renderer_host/compositor_impl_android.h" 25 #include "content/browser/renderer_host/compositor_impl_android.h"
25 #include "content/browser/renderer_host/image_transport_factory_android.h" 26 #include "content/browser/renderer_host/image_transport_factory_android.h"
26 #include "content/browser/renderer_host/render_widget_host_impl.h" 27 #include "content/browser/renderer_host/render_widget_host_impl.h"
27 #include "content/browser/renderer_host/surface_texture_transport_client_android .h" 28 #include "content/browser/renderer_host/surface_texture_transport_client_android .h"
28 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_android.h" 29 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_android.h"
29 #include "content/common/gpu/client/gl_helper.h" 30 #include "content/common/gpu/client/gl_helper.h"
30 #include "content/common/gpu/gpu_messages.h" 31 #include "content/common/gpu/gpu_messages.h"
31 #include "content/common/input_messages.h" 32 #include "content/common/input_messages.h"
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 // intentionally empty, like RenderWidgetHostViewViews 823 // intentionally empty, like RenderWidgetHostViewViews
823 } 824 }
824 825
825 void RenderWidgetHostViewAndroid::UnhandledWheelEvent( 826 void RenderWidgetHostViewAndroid::UnhandledWheelEvent(
826 const WebKit::WebMouseWheelEvent& event) { 827 const WebKit::WebMouseWheelEvent& event) {
827 // intentionally empty, like RenderWidgetHostViewViews 828 // intentionally empty, like RenderWidgetHostViewViews
828 } 829 }
829 830
830 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent( 831 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent(
831 const WebKit::WebInputEvent& input_event) { 832 const WebKit::WebInputEvent& input_event) {
832 if (!content_view_core_) 833 if (host_) {
833 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 834 SynchronousCompositorImpl* compositor =
834 835 SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(),
835 return content_view_core_->FilterInputEvent(input_event); 836 host_->GetRoutingID());
837 if (compositor)
838 return compositor->HandleInputEvent(input_event);
839 }
840 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
836 } 841 }
837 842
838 void RenderWidgetHostViewAndroid::OnAccessibilityNotifications( 843 void RenderWidgetHostViewAndroid::OnAccessibilityNotifications(
839 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { 844 const std::vector<AccessibilityHostMsg_NotificationParams>& params) {
840 } 845 }
841 846
842 bool RenderWidgetHostViewAndroid::LockMouse() { 847 bool RenderWidgetHostViewAndroid::LockMouse() {
843 NOTIMPLEMENTED(); 848 NOTIMPLEMENTED();
844 return false; 849 return false;
845 } 850 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 // RenderWidgetHostView, public: 1022 // RenderWidgetHostView, public:
1018 1023
1019 // static 1024 // static
1020 RenderWidgetHostView* 1025 RenderWidgetHostView*
1021 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1026 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1022 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1027 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1023 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1028 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1024 } 1029 }
1025 1030
1026 } // namespace content 1031 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/sync_input_event_filter.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698