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/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 17 matching lines...) Expand all Loading... |
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_data_manager_impl.h" | 31 #include "content/browser/gpu/gpu_data_manager_impl.h" |
32 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 32 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
33 #include "content/browser/gpu/gpu_surface_tracker.h" | 33 #include "content/browser/gpu/gpu_surface_tracker.h" |
34 #include "content/browser/renderer_host/compositor_impl_android.h" | 34 #include "content/browser/renderer_host/compositor_impl_android.h" |
35 #include "content/browser/renderer_host/dip_util.h" | 35 #include "content/browser/renderer_host/dip_util.h" |
36 #include "content/browser/renderer_host/generic_touch_gesture_android.h" | 36 #include "content/browser/renderer_host/generic_touch_gesture_android.h" |
37 #include "content/browser/renderer_host/image_transport_factory_android.h" | 37 #include "content/browser/renderer_host/image_transport_factory_android.h" |
| 38 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" |
38 #include "content/browser/renderer_host/render_widget_host_impl.h" | 39 #include "content/browser/renderer_host/render_widget_host_impl.h" |
39 #include "content/common/gpu/client/gl_helper.h" | 40 #include "content/common/gpu/client/gl_helper.h" |
40 #include "content/common/gpu/gpu_messages.h" | 41 #include "content/common/gpu/gpu_messages.h" |
41 #include "content/common/input_messages.h" | 42 #include "content/common/input_messages.h" |
42 #include "content/common/view_messages.h" | 43 #include "content/common/view_messages.h" |
43 #include "content/public/common/content_switches.h" | 44 #include "content/public/common/content_switches.h" |
44 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 45 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
45 #include "skia/ext/image_operations.h" | 46 #include "skia/ext/image_operations.h" |
46 #include "third_party/khronos/GLES2/gl2.h" | 47 #include "third_party/khronos/GLES2/gl2.h" |
47 #include "third_party/khronos/GLES2/gl2ext.h" | 48 #include "third_party/khronos/GLES2/gl2ext.h" |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 } | 609 } |
609 | 610 |
610 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup( | 611 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup( |
611 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { | 612 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { |
612 if (!content_view_core_) | 613 if (!content_view_core_) |
613 return; | 614 return; |
614 | 615 |
615 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap); | 616 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap); |
616 } | 617 } |
617 | 618 |
| 619 scoped_ptr<SyntheticGestureTarget> |
| 620 RenderWidgetHostViewAndroid::CreateSyntheticGestureTarget() { |
| 621 return scoped_ptr<SyntheticGestureTarget>(new SyntheticGestureTargetAndroid( |
| 622 host_, content_view_core_->CreateTouchEventSynthesizer())); |
| 623 } |
| 624 |
618 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture( | 625 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture( |
619 bool scroll_down, int pixels_to_scroll, int mouse_event_x, | 626 bool scroll_down, int pixels_to_scroll, int mouse_event_x, |
620 int mouse_event_y) { | 627 int mouse_event_y) { |
621 return new GenericTouchGestureAndroid( | 628 return new GenericTouchGestureAndroid( |
622 GetRenderWidgetHost(), | 629 GetRenderWidgetHost(), |
623 content_view_core_->CreateOnePointTouchGesture( | 630 content_view_core_->CreateOnePointTouchGesture( |
624 mouse_event_x, mouse_event_y, | 631 mouse_event_x, mouse_event_y, |
625 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll)); | 632 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll)); |
626 } | 633 } |
627 | 634 |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 // RenderWidgetHostView, public: | 1384 // RenderWidgetHostView, public: |
1378 | 1385 |
1379 // static | 1386 // static |
1380 RenderWidgetHostView* | 1387 RenderWidgetHostView* |
1381 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1388 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1382 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1389 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1383 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1390 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1384 } | 1391 } |
1385 | 1392 |
1386 } // namespace content | 1393 } // namespace content |
OLD | NEW |