| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 76 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
| 77 #include "ipc/ipc_message_macros.h" | 77 #include "ipc/ipc_message_macros.h" |
| 78 #include "ipc/ipc_message_start.h" | 78 #include "ipc/ipc_message_start.h" |
| 79 #include "skia/ext/image_operations.h" | 79 #include "skia/ext/image_operations.h" |
| 80 #include "third_party/khronos/GLES2/gl2.h" | 80 #include "third_party/khronos/GLES2/gl2.h" |
| 81 #include "third_party/khronos/GLES2/gl2ext.h" | 81 #include "third_party/khronos/GLES2/gl2ext.h" |
| 82 #include "third_party/skia/include/core/SkCanvas.h" | 82 #include "third_party/skia/include/core/SkCanvas.h" |
| 83 #include "ui/android/window_android.h" | 83 #include "ui/android/window_android.h" |
| 84 #include "ui/android/window_android_compositor.h" | 84 #include "ui/android/window_android_compositor.h" |
| 85 #include "ui/base/layout.h" | 85 #include "ui/base/layout.h" |
| 86 #include "ui/base/ui_base_types.h" |
| 86 #include "ui/events/android/motion_event_android.h" | 87 #include "ui/events/android/motion_event_android.h" |
| 87 #include "ui/events/base_event_utils.h" | 88 #include "ui/events/base_event_utils.h" |
| 88 #include "ui/events/blink/blink_event_util.h" | 89 #include "ui/events/blink/blink_event_util.h" |
| 89 #include "ui/events/blink/did_overscroll_params.h" | 90 #include "ui/events/blink/did_overscroll_params.h" |
| 90 #include "ui/events/blink/web_input_event_traits.h" | 91 #include "ui/events/blink/web_input_event_traits.h" |
| 91 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" | 92 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" |
| 92 #include "ui/gfx/android/java_bitmap.h" | 93 #include "ui/gfx/android/java_bitmap.h" |
| 93 #include "ui/gfx/android/view_configuration.h" | 94 #include "ui/gfx/android/view_configuration.h" |
| 94 #include "ui/gfx/geometry/dip_util.h" | 95 #include "ui/gfx/geometry/dip_util.h" |
| 95 #include "ui/gfx/geometry/size_conversions.h" | 96 #include "ui/gfx/geometry/size_conversions.h" |
| (...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 host_->Send(new ViewMsg_ResolveTapDisambiguation( | 1856 host_->Send(new ViewMsg_ResolveTapDisambiguation( |
| 1856 host_->GetRoutingID(), timestamp_seconds, tap_viewport_offset, | 1857 host_->GetRoutingID(), timestamp_seconds, tap_viewport_offset, |
| 1857 is_long_press)); | 1858 is_long_press)); |
| 1858 } | 1859 } |
| 1859 | 1860 |
| 1860 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { | 1861 void RenderWidgetHostViewAndroid::MoveCaret(const gfx::Point& point) { |
| 1861 if (host_) | 1862 if (host_) |
| 1862 host_->MoveCaret(point); | 1863 host_->MoveCaret(point); |
| 1863 } | 1864 } |
| 1864 | 1865 |
| 1865 void RenderWidgetHostViewAndroid::ShowContextMenuAtPoint( | 1866 void RenderWidgetHostViewAndroid::ShowContextMenuAtTouchHandle( |
| 1866 const gfx::Point& point) { | 1867 const gfx::Point& point) { |
| 1867 if (host_) | 1868 if (host_) |
| 1868 host_->ShowContextMenuAtPoint(point); | 1869 host_->ShowContextMenuAtPoint(point, ui::MENU_SOURCE_TOUCH_HANDLE); |
| 1869 } | 1870 } |
| 1870 | 1871 |
| 1871 void RenderWidgetHostViewAndroid::DismissTextHandles() { | 1872 void RenderWidgetHostViewAndroid::DismissTextHandles() { |
| 1872 if (touch_selection_controller_) | 1873 if (touch_selection_controller_) |
| 1873 touch_selection_controller_->HideAndDisallowShowingAutomatically(); | 1874 touch_selection_controller_->HideAndDisallowShowingAutomatically(); |
| 1874 } | 1875 } |
| 1875 | 1876 |
| 1876 void RenderWidgetHostViewAndroid::SetTextHandlesTemporarilyHidden(bool hidden) { | 1877 void RenderWidgetHostViewAndroid::SetTextHandlesTemporarilyHidden(bool hidden) { |
| 1877 if (touch_selection_controller_) | 1878 if (touch_selection_controller_) |
| 1878 touch_selection_controller_->SetTemporarilyHidden(hidden); | 1879 touch_selection_controller_->SetTemporarilyHidden(hidden); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2239 |
| 2239 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2240 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2240 if (!compositor) | 2241 if (!compositor) |
| 2241 return; | 2242 return; |
| 2242 | 2243 |
| 2243 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2244 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2244 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2245 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2245 } | 2246 } |
| 2246 | 2247 |
| 2247 } // namespace content | 2248 } // namespace content |
| OLD | NEW |