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 15 matching lines...) Expand all Loading... |
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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 } | 605 } |
605 | 606 |
606 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup( | 607 void RenderWidgetHostViewAndroid::ShowDisambiguationPopup( |
607 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { | 608 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap) { |
608 if (!content_view_core_) | 609 if (!content_view_core_) |
609 return; | 610 return; |
610 | 611 |
611 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap); | 612 content_view_core_->ShowDisambiguationPopup(target_rect, zoomed_bitmap); |
612 } | 613 } |
613 | 614 |
| 615 scoped_ptr<SyntheticGestureTarget> |
| 616 RenderWidgetHostViewAndroid::CreateSyntheticGestureTarget() { |
| 617 return scoped_ptr<SyntheticGestureTarget>(new SyntheticGestureTargetAndroid( |
| 618 host_, content_view_core_->CreateTouchEventSynthesizer())); |
| 619 } |
| 620 |
614 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture( | 621 SyntheticGesture* RenderWidgetHostViewAndroid::CreateSmoothScrollGesture( |
615 bool scroll_down, int pixels_to_scroll, int mouse_event_x, | 622 bool scroll_down, int pixels_to_scroll, int mouse_event_x, |
616 int mouse_event_y) { | 623 int mouse_event_y) { |
617 return new GenericTouchGestureAndroid( | 624 return new GenericTouchGestureAndroid( |
618 GetRenderWidgetHost(), | 625 GetRenderWidgetHost(), |
619 content_view_core_->CreateOnePointTouchGesture( | 626 content_view_core_->CreateOnePointTouchGesture( |
620 mouse_event_x, mouse_event_y, | 627 mouse_event_x, mouse_event_y, |
621 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll)); | 628 0, scroll_down ? -pixels_to_scroll : pixels_to_scroll)); |
622 } | 629 } |
623 | 630 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 // RenderWidgetHostView, public: | 1373 // RenderWidgetHostView, public: |
1367 | 1374 |
1368 // static | 1375 // static |
1369 RenderWidgetHostView* | 1376 RenderWidgetHostView* |
1370 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1377 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1371 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1378 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1372 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1379 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1373 } | 1380 } |
1374 | 1381 |
1375 } // namespace content | 1382 } // namespace content |
OLD | NEW |