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

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

Issue 26664002: SyntheticGestureTarget implementation for injecting synthetic input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused forward decl Created 7 years, 1 month 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
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 15 matching lines...) Expand all
26 #include "cc/trees/layer_tree_host.h" 26 #include "cc/trees/layer_tree_host.h"
27 #include "content/browser/accessibility/browser_accessibility_manager_android.h" 27 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
28 #include "content/browser/android/content_view_core_impl.h" 28 #include "content/browser/android/content_view_core_impl.h"
29 #include "content/browser/android/in_process/synchronous_compositor_impl.h" 29 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
30 #include "content/browser/android/overscroll_glow.h" 30 #include "content/browser/android/overscroll_glow.h"
31 #include "content/browser/gpu/gpu_surface_tracker.h" 31 #include "content/browser/gpu/gpu_surface_tracker.h"
32 #include "content/browser/renderer_host/compositor_impl_android.h" 32 #include "content/browser/renderer_host/compositor_impl_android.h"
33 #include "content/browser/renderer_host/dip_util.h" 33 #include "content/browser/renderer_host/dip_util.h"
34 #include "content/browser/renderer_host/generic_touch_gesture_android.h" 34 #include "content/browser/renderer_host/generic_touch_gesture_android.h"
35 #include "content/browser/renderer_host/image_transport_factory_android.h" 35 #include "content/browser/renderer_host/image_transport_factory_android.h"
36 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h "
36 #include "content/browser/renderer_host/render_widget_host_impl.h" 37 #include "content/browser/renderer_host/render_widget_host_impl.h"
37 #include "content/common/gpu/client/gl_helper.h" 38 #include "content/common/gpu/client/gl_helper.h"
38 #include "content/common/gpu/gpu_messages.h" 39 #include "content/common/gpu/gpu_messages.h"
39 #include "content/common/input_messages.h" 40 #include "content/common/input_messages.h"
40 #include "content/common/view_messages.h" 41 #include "content/common/view_messages.h"
41 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
42 #include "skia/ext/image_operations.h" 43 #include "skia/ext/image_operations.h"
43 #include "third_party/khronos/GLES2/gl2.h" 44 #include "third_party/khronos/GLES2/gl2.h"
44 #include "third_party/khronos/GLES2/gl2ext.h" 45 #include "third_party/khronos/GLES2/gl2ext.h"
45 #include "ui/gfx/android/device_display_info.h" 46 #include "ui/gfx/android/device_display_info.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 613 }
613 614
614 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup( 615 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup(
615 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { 616 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) {
616 if (!content_view_core_) 617 if (!content_view_core_)
617 return; 618 return;
618 619
619 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap); 620 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap);
620 } 621 }
621 622
623 SyntheticGestureTarget*
624 RenderWidgetHostViewAndroid::CreateSyntheticGestureTarget() {
625 return new SyntheticGestureTargetAndroid(this);
626 }
627
622 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture( 628 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture(
623 bool scroll_down, int pixels_to_scroll, int mouse_event_x, 629 bool scroll_down, int pixels_to_scroll, int mouse_event_x,
624 int mouse_event_y) { 630 int mouse_event_y) {
625 return new GenericTouchGestureAndroid( 631 return new GenericTouchGestureAndroid(
626 GetRenderWidgetHost(), 632 GetRenderWidgetHost(),
627 content_view_core_->CreateOnePointTouchGesture( 633 content_view_core_->CreateOnePointTouchGesture(
628 mouse_event_x, mouse_event_y, 634 mouse_event_x, mouse_event_y,
629 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll)); 635 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll));
630 } 636 }
631 637
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 // RenderWidgetHostView, public: 1389 // RenderWidgetHostView, public:
1384 1390
1385 // static 1391 // static
1386 RenderWidgetHostView* 1392 RenderWidgetHostView*
1387 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1393 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1388 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1394 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1389 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1395 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1390 } 1396 }
1391 1397
1392 } // namespace content 1398 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698