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

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

Issue 101933004: Eager Gesture Recognizer (WIP) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Starting work on Android. Created 6 years, 11 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/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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 21 matching lines...) Expand all
32 #include "content/browser/devtools/render_view_devtools_agent_host.h" 32 #include "content/browser/devtools/render_view_devtools_agent_host.h"
33 #include "content/browser/gpu/gpu_data_manager_impl.h" 33 #include "content/browser/gpu/gpu_data_manager_impl.h"
34 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 34 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
35 #include "content/browser/gpu/gpu_surface_tracker.h" 35 #include "content/browser/gpu/gpu_surface_tracker.h"
36 #include "content/browser/renderer_host/compositor_impl_android.h" 36 #include "content/browser/renderer_host/compositor_impl_android.h"
37 #include "content/browser/renderer_host/dip_util.h" 37 #include "content/browser/renderer_host/dip_util.h"
38 #include "content/browser/renderer_host/image_transport_factory_android.h" 38 #include "content/browser/renderer_host/image_transport_factory_android.h"
39 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " 39 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h "
40 #include "content/browser/renderer_host/render_process_host_impl.h" 40 #include "content/browser/renderer_host/render_process_host_impl.h"
41 #include "content/browser/renderer_host/render_widget_host_impl.h" 41 #include "content/browser/renderer_host/render_widget_host_impl.h"
42 #include "content/browser/renderer_host/ui_events_helper.h"
42 #include "content/common/gpu/client/gl_helper.h" 43 #include "content/common/gpu/client/gl_helper.h"
43 #include "content/common/gpu/gpu_messages.h" 44 #include "content/common/gpu/gpu_messages.h"
44 #include "content/common/input_messages.h" 45 #include "content/common/input_messages.h"
45 #include "content/common/view_messages.h" 46 #include "content/common/view_messages.h"
46 #include "content/public/browser/devtools_agent_host.h" 47 #include "content/public/browser/devtools_agent_host.h"
47 #include "content/public/browser/render_view_host.h" 48 #include "content/public/browser/render_view_host.h"
48 #include "content/public/common/content_switches.h" 49 #include "content/public/common/content_switches.h"
49 #include "gpu/config/gpu_driver_bug_workaround_type.h" 50 #include "gpu/config/gpu_driver_bug_workaround_type.h"
50 #include "skia/ext/image_operations.h" 51 #include "skia/ext/image_operations.h"
51 #include "third_party/khronos/GLES2/gl2.h" 52 #include "third_party/khronos/GLES2/gl2.h"
52 #include "third_party/khronos/GLES2/gl2ext.h" 53 #include "third_party/khronos/GLES2/gl2ext.h"
53 #include "third_party/skia/include/core/SkCanvas.h" 54 #include "third_party/skia/include/core/SkCanvas.h"
54 #include "ui/base/android/window_android.h" 55 #include "ui/base/android/window_android.h"
56 #include "ui/events/event.h"
55 #include "ui/gfx/android/device_display_info.h" 57 #include "ui/gfx/android/device_display_info.h"
56 #include "ui/gfx/android/java_bitmap.h" 58 #include "ui/gfx/android/java_bitmap.h"
57 #include "ui/gfx/display.h" 59 #include "ui/gfx/display.h"
58 #include "ui/gfx/screen.h" 60 #include "ui/gfx/screen.h"
59 #include "ui/gfx/size_conversions.h" 61 #include "ui/gfx/size_conversions.h"
60 62
61 namespace content { 63 namespace content {
62 64
63 namespace { 65 namespace {
64 66
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NATIVE_TRANSPORT); 1013 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NATIVE_TRANSPORT);
1012 if (CompositorImpl::IsInitialized()) { 1014 if (CompositorImpl::IsInitialized()) {
1013 handle.parent_client_id = 1015 handle.parent_client_id =
1014 ImageTransportFactoryAndroid::GetInstance()->GetChannelID(); 1016 ImageTransportFactoryAndroid::GetInstance()->GetChannelID();
1015 } 1017 }
1016 return handle; 1018 return handle;
1017 } 1019 }
1018 1020
1019 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1021 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1020 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1022 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1023 LOG(ERROR) << "ProcessAckedTouchEvent";
1021 if (content_view_core_) 1024 if (content_view_core_)
1022 content_view_core_->ConfirmTouchEvent(ack_result); 1025 content_view_core_->ConfirmTouchEvent(ack_result);
1023 } 1026 }
1024 1027
1025 void RenderWidgetHostViewAndroid::SetHasHorizontalScrollbar( 1028 void RenderWidgetHostViewAndroid::SetHasHorizontalScrollbar(
1026 bool has_horizontal_scrollbar) { 1029 bool has_horizontal_scrollbar) {
1027 // intentionally empty, like RenderWidgetHostViewViews 1030 // intentionally empty, like RenderWidgetHostViewViews
1028 } 1031 }
1029 1032
1030 void RenderWidgetHostViewAndroid::SetScrollOffsetPinning( 1033 void RenderWidgetHostViewAndroid::SetScrollOffsetPinning(
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 // Methods called from the host to the render 1162 // Methods called from the host to the render
1160 1163
1161 void RenderWidgetHostViewAndroid::SendKeyEvent( 1164 void RenderWidgetHostViewAndroid::SendKeyEvent(
1162 const NativeWebKeyboardEvent& event) { 1165 const NativeWebKeyboardEvent& event) {
1163 if (host_) 1166 if (host_)
1164 host_->ForwardKeyboardEvent(event); 1167 host_->ForwardKeyboardEvent(event);
1165 } 1168 }
1166 1169
1167 void RenderWidgetHostViewAndroid::SendTouchEvent( 1170 void RenderWidgetHostViewAndroid::SendTouchEvent(
1168 const blink::WebTouchEvent& event) { 1171 const blink::WebTouchEvent& event) {
1172 LOG(ERROR) << "RWHVA SendTouchEvent";
1169 if (host_) 1173 if (host_)
1170 host_->ForwardTouchEventWithLatencyInfo(event, ui::LatencyInfo()); 1174 host_->ForwardTouchEventWithLatencyInfo(event, ui::LatencyInfo());
1175
1176 TouchEventWithLatencyInfo touch_with_latency(event, ui::LatencyInfo());
1177 ScopedVector<ui::TouchEvent> events;
1178 MakeUITouchEventsFromWebTouchEvents(
1179 touch_with_latency, &events, content::LOCAL_COORDINATES);
1180 for (ScopedVector<ui::TouchEvent>::iterator it = events.begin();
1181 it != events.end();
1182 ++it) {
1183 LOG(ERROR) << "I HAVE AN EVENT"; // TODO
1184 }
1171 } 1185 }
1172 1186
1173 1187
1174 void RenderWidgetHostViewAndroid::SendMouseEvent( 1188 void RenderWidgetHostViewAndroid::SendMouseEvent(
1175 const blink::WebMouseEvent& event) { 1189 const blink::WebMouseEvent& event) {
1176 if (host_) 1190 if (host_)
1177 host_->ForwardMouseEvent(event); 1191 host_->ForwardMouseEvent(event);
1178 } 1192 }
1179 1193
1180 void RenderWidgetHostViewAndroid::SendMouseWheelEvent( 1194 void RenderWidgetHostViewAndroid::SendMouseWheelEvent(
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 // RenderWidgetHostView, public: 1434 // RenderWidgetHostView, public:
1421 1435
1422 // static 1436 // static
1423 RenderWidgetHostView* 1437 RenderWidgetHostView*
1424 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1438 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1425 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1439 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1426 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1440 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1427 } 1441 }
1428 1442
1429 } // namespace content 1443 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698