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

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

Issue 2468043002: Removed OnShowingPastePopup (Closed)
Patch Set: Created 4 years, 1 month 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 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 void RenderWidgetHostViewAndroid::DismissTextHandles() { 1693 void RenderWidgetHostViewAndroid::DismissTextHandles() {
1694 if (selection_controller_) 1694 if (selection_controller_)
1695 selection_controller_->HideAndDisallowShowingAutomatically(); 1695 selection_controller_->HideAndDisallowShowingAutomatically();
1696 } 1696 }
1697 1697
1698 void RenderWidgetHostViewAndroid::SetTextHandlesTemporarilyHidden(bool hidden) { 1698 void RenderWidgetHostViewAndroid::SetTextHandlesTemporarilyHidden(bool hidden) {
1699 if (selection_controller_) 1699 if (selection_controller_)
1700 selection_controller_->SetTemporarilyHidden(hidden); 1700 selection_controller_->SetTemporarilyHidden(hidden);
1701 } 1701 }
1702 1702
1703 void RenderWidgetHostViewAndroid::OnShowingPastePopup(
1704 const gfx::PointF& point) {
1705 if (!selection_controller_)
1706 return;
1707
1708 // As the paste popup may be triggered *before* the bounds and editability
1709 // of the region have been updated, explicitly set the properties now.
1710 // TODO(jdduke): Remove this workaround when auxiliary paste popup
1711 // notifications are no longer required, crbug.com/398170.
1712 gfx::SelectionBound insertion_bound;
1713 insertion_bound.set_type(gfx::SelectionBound::CENTER);
1714 insertion_bound.set_visible(true);
1715 insertion_bound.SetEdge(point, point);
1716 selection_controller_->HideAndDisallowShowingAutomatically();
1717 selection_controller_->OnSelectionEditable(true);
1718 selection_controller_->OnSelectionEmpty(true);
1719 selection_controller_->OnSelectionBoundsChanged(insertion_bound,
1720 insertion_bound);
1721 selection_controller_->AllowShowingFromCurrentSelection();
1722 }
1723
1724 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const { 1703 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const {
1725 return cached_background_color_; 1704 return cached_background_color_;
1726 } 1705 }
1727 1706
1728 void RenderWidgetHostViewAndroid::DidOverscroll( 1707 void RenderWidgetHostViewAndroid::DidOverscroll(
1729 const ui::DidOverscrollParams& params) { 1708 const ui::DidOverscrollParams& params) {
1730 if (sync_compositor_) 1709 if (sync_compositor_)
1731 sync_compositor_->DidOverscroll(params); 1710 sync_compositor_->DidOverscroll(params);
1732 1711
1733 if (!content_view_core_ || !is_showing_) 1712 if (!content_view_core_ || !is_showing_)
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 case ui::MotionEvent::ACTION_UP: 1967 case ui::MotionEvent::ACTION_UP:
1989 case ui::MotionEvent::ACTION_POINTER_UP: 1968 case ui::MotionEvent::ACTION_POINTER_UP:
1990 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1969 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1991 delta.InMicroseconds(), 1, 1000000, 50); 1970 delta.InMicroseconds(), 1, 1000000, 50);
1992 default: 1971 default:
1993 return; 1972 return;
1994 } 1973 }
1995 } 1974 }
1996 1975
1997 } // namespace content 1976 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698