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

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

Issue 2034863002: Move SelectionBound from ui/base/touch to ui/gfx to be used by cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated views_unittests Created 4 years, 6 months 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 <utility> 9 #include <utility>
10 10
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 1692
1693 void RenderWidgetHostViewAndroid::OnShowingPastePopup( 1693 void RenderWidgetHostViewAndroid::OnShowingPastePopup(
1694 const gfx::PointF& point) { 1694 const gfx::PointF& point) {
1695 if (!selection_controller_) 1695 if (!selection_controller_)
1696 return; 1696 return;
1697 1697
1698 // As the paste popup may be triggered *before* the bounds and editability 1698 // As the paste popup may be triggered *before* the bounds and editability
1699 // of the region have been updated, explicitly set the properties now. 1699 // of the region have been updated, explicitly set the properties now.
1700 // TODO(jdduke): Remove this workaround when auxiliary paste popup 1700 // TODO(jdduke): Remove this workaround when auxiliary paste popup
1701 // notifications are no longer required, crbug.com/398170. 1701 // notifications are no longer required, crbug.com/398170.
1702 ui::SelectionBound insertion_bound; 1702 gfx::SelectionBound insertion_bound;
1703 insertion_bound.set_type(ui::SelectionBound::CENTER); 1703 insertion_bound.set_type(gfx::SelectionBound::CENTER);
1704 insertion_bound.set_visible(true); 1704 insertion_bound.set_visible(true);
1705 insertion_bound.SetEdge(point, point); 1705 insertion_bound.SetEdge(point, point);
1706 selection_controller_->HideAndDisallowShowingAutomatically(); 1706 selection_controller_->HideAndDisallowShowingAutomatically();
1707 selection_controller_->OnSelectionEditable(true); 1707 selection_controller_->OnSelectionEditable(true);
1708 selection_controller_->OnSelectionEmpty(true); 1708 selection_controller_->OnSelectionEmpty(true);
1709 selection_controller_->OnSelectionBoundsChanged(insertion_bound, 1709 selection_controller_->OnSelectionBoundsChanged(insertion_bound,
1710 insertion_bound); 1710 insertion_bound);
1711 selection_controller_->AllowShowingFromCurrentSelection(); 1711 selection_controller_->AllowShowingFromCurrentSelection();
1712 } 1712 }
1713 1713
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 case ui::MotionEvent::ACTION_UP: 2045 case ui::MotionEvent::ACTION_UP:
2046 case ui::MotionEvent::ACTION_POINTER_UP: 2046 case ui::MotionEvent::ACTION_POINTER_UP:
2047 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 2047 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
2048 delta.InMicroseconds(), 1, 1000000, 50); 2048 delta.InMicroseconds(), 1, 1000000, 50);
2049 default: 2049 default:
2050 return; 2050 return;
2051 } 2051 }
2052 } 2052 }
2053 2053
2054 } // namespace content 2054 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698