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/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/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "cc/layers/delegated_renderer_layer.h" | 15 #include "cc/layers/delegated_renderer_layer.h" |
16 #include "cc/layers/layer.h" | 16 #include "cc/layers/layer.h" |
17 #include "cc/layers/texture_layer.h" | 17 #include "cc/layers/texture_layer.h" |
18 #include "cc/output/compositor_frame.h" | 18 #include "cc/output/compositor_frame.h" |
19 #include "cc/output/compositor_frame_ack.h" | 19 #include "cc/output/compositor_frame_ack.h" |
20 #include "content/browser/android/content_view_core_impl.h" | 20 #include "content/browser/android/content_view_core_impl.h" |
| 21 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
21 #include "content/browser/android/overscroll_glow.h" | 22 #include "content/browser/android/overscroll_glow.h" |
22 #include "content/browser/gpu/gpu_surface_tracker.h" | 23 #include "content/browser/gpu/gpu_surface_tracker.h" |
23 #include "content/browser/renderer_host/compositor_impl_android.h" | 24 #include "content/browser/renderer_host/compositor_impl_android.h" |
24 #include "content/browser/renderer_host/image_transport_factory_android.h" | 25 #include "content/browser/renderer_host/image_transport_factory_android.h" |
25 #include "content/browser/renderer_host/render_widget_host_impl.h" | 26 #include "content/browser/renderer_host/render_widget_host_impl.h" |
26 #include "content/browser/renderer_host/surface_texture_transport_client_android
.h" | 27 #include "content/browser/renderer_host/surface_texture_transport_client_android
.h" |
27 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_android.h" | 28 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_android.h" |
28 #include "content/common/gpu/client/gl_helper.h" | 29 #include "content/common/gpu/client/gl_helper.h" |
29 #include "content/common/gpu/gpu_messages.h" | 30 #include "content/common/gpu/gpu_messages.h" |
30 #include "content/common/input_messages.h" | 31 #include "content/common/input_messages.h" |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 // intentionally empty, like RenderWidgetHostViewViews | 802 // intentionally empty, like RenderWidgetHostViewViews |
802 } | 803 } |
803 | 804 |
804 void RenderWidgetHostViewAndroid::UnhandledWheelEvent( | 805 void RenderWidgetHostViewAndroid::UnhandledWheelEvent( |
805 const WebKit::WebMouseWheelEvent& event) { | 806 const WebKit::WebMouseWheelEvent& event) { |
806 // intentionally empty, like RenderWidgetHostViewViews | 807 // intentionally empty, like RenderWidgetHostViewViews |
807 } | 808 } |
808 | 809 |
809 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent( | 810 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent( |
810 const WebKit::WebInputEvent& input_event) { | 811 const WebKit::WebInputEvent& input_event) { |
811 if (!content_view_core_) | 812 SynchronousCompositorImpl* compositor = |
812 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 813 SynchronousCompositorImpl::FromRoutingID(host_->GetRoutingID()); |
813 | 814 return compositor ? compositor->HandleInputEvent(input_event) |
814 return content_view_core_->FilterInputEvent(input_event); | 815 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
815 } | 816 } |
816 | 817 |
817 void RenderWidgetHostViewAndroid::OnAccessibilityNotifications( | 818 void RenderWidgetHostViewAndroid::OnAccessibilityNotifications( |
818 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 819 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
819 } | 820 } |
820 | 821 |
821 bool RenderWidgetHostViewAndroid::LockMouse() { | 822 bool RenderWidgetHostViewAndroid::LockMouse() { |
822 NOTIMPLEMENTED(); | 823 NOTIMPLEMENTED(); |
823 return false; | 824 return false; |
824 } | 825 } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 // RenderWidgetHostView, public: | 995 // RenderWidgetHostView, public: |
995 | 996 |
996 // static | 997 // static |
997 RenderWidgetHostView* | 998 RenderWidgetHostView* |
998 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 999 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
999 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1000 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1000 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1001 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1001 } | 1002 } |
1002 | 1003 |
1003 } // namespace content | 1004 } // namespace content |
OLD | NEW |