| 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 DCHECK(selection_popup_controller_); | 1298 DCHECK(selection_popup_controller_); |
| 1299 DCHECK(touch_selection_controller_); | 1299 DCHECK(touch_selection_controller_); |
| 1300 // If a selection drag has started, it has taken over the active touch | 1300 // If a selection drag has started, it has taken over the active touch |
| 1301 // sequence. Immediately cancel gesture detection and any downstream touch | 1301 // sequence. Immediately cancel gesture detection and any downstream touch |
| 1302 // listeners (e.g., web content) to communicate this transfer. | 1302 // listeners (e.g., web content) to communicate this transfer. |
| 1303 if (event == ui::SELECTION_HANDLES_SHOWN && | 1303 if (event == ui::SELECTION_HANDLES_SHOWN && |
| 1304 gesture_provider_.GetCurrentDownEvent()) { | 1304 gesture_provider_.GetCurrentDownEvent()) { |
| 1305 ResetGestureDetection(); | 1305 ResetGestureDetection(); |
| 1306 } | 1306 } |
| 1307 selection_popup_controller_->OnSelectionEvent( | 1307 selection_popup_controller_->OnSelectionEvent( |
| 1308 event, touch_selection_controller_->GetStartPosition(), | 1308 event, GetSelectionRect(*touch_selection_controller_)); |
| 1309 GetSelectionRect(*touch_selection_controller_)); | |
| 1310 } | 1309 } |
| 1311 | 1310 |
| 1312 std::unique_ptr<ui::TouchHandleDrawable> | 1311 std::unique_ptr<ui::TouchHandleDrawable> |
| 1313 RenderWidgetHostViewAndroid::CreateDrawable() { | 1312 RenderWidgetHostViewAndroid::CreateDrawable() { |
| 1314 DCHECK(content_view_core_); | 1313 DCHECK(content_view_core_); |
| 1315 if (!using_browser_compositor_) { | 1314 if (!using_browser_compositor_) { |
| 1316 if (!sync_compositor_) | 1315 if (!sync_compositor_) |
| 1317 return nullptr; | 1316 return nullptr; |
| 1318 return std::unique_ptr<ui::TouchHandleDrawable>( | 1317 return std::unique_ptr<ui::TouchHandleDrawable>( |
| 1319 sync_compositor_->client()->CreateDrawable()); | 1318 sync_compositor_->client()->CreateDrawable()); |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 | 2190 |
| 2192 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2191 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2193 if (!compositor) | 2192 if (!compositor) |
| 2194 return; | 2193 return; |
| 2195 | 2194 |
| 2196 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2195 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2197 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2196 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2198 } | 2197 } |
| 2199 | 2198 |
| 2200 } // namespace content | 2199 } // namespace content |
| OLD | NEW |