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

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

Issue 499393002: Set the Insertion handle correctly while showing the paste popup menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed few move unwanted line breaks Created 6 years, 3 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 void RenderWidgetHostViewAndroid::OnShowingPastePopup( 1537 void RenderWidgetHostViewAndroid::OnShowingPastePopup(
1538 const gfx::PointF& point) { 1538 const gfx::PointF& point) {
1539 if (!selection_controller_) 1539 if (!selection_controller_)
1540 return; 1540 return;
1541 1541
1542 // As the paste popup may be triggered *before* the bounds and editability 1542 // As the paste popup may be triggered *before* the bounds and editability
1543 // of the region have been updated, explicitly set the properties now. 1543 // of the region have been updated, explicitly set the properties now.
1544 // TODO(jdduke): Remove this workaround when auxiliary paste popup 1544 // TODO(jdduke): Remove this workaround when auxiliary paste popup
1545 // notifications are no longer required, crbug.com/398170. 1545 // notifications are no longer required, crbug.com/398170.
1546 cc::ViewportSelectionBound insertion_bound; 1546 cc::ViewportSelectionBound insertion_bound;
1547 insertion_bound.type = cc::SELECTION_BOUND_LEFT; 1547 insertion_bound.type = cc::SELECTION_BOUND_CENTER;
1548 insertion_bound.visible = true; 1548 insertion_bound.visible = true;
1549 insertion_bound.edge_top = point; 1549 insertion_bound.edge_top = point;
1550 insertion_bound.edge_bottom = point; 1550 insertion_bound.edge_bottom = point;
1551 HideTextHandles(); 1551 HideTextHandles();
1552 ShowSelectionHandlesAutomatically(); 1552 ShowSelectionHandlesAutomatically();
1553 selection_controller_->OnSelectionEditable(true); 1553 selection_controller_->OnSelectionEditable(true);
1554 selection_controller_->OnSelectionEmpty(true); 1554 selection_controller_->OnSelectionEmpty(true);
1555 selection_controller_->OnSelectionBoundsChanged(insertion_bound, 1555 selection_controller_->OnSelectionBoundsChanged(insertion_bound,
1556 insertion_bound); 1556 insertion_bound);
1557 } 1557 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 results->orientationAngle = display.RotationAsDegree(); 1837 results->orientationAngle = display.RotationAsDegree();
1838 results->orientationType = 1838 results->orientationType =
1839 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1839 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1840 gfx::DeviceDisplayInfo info; 1840 gfx::DeviceDisplayInfo info;
1841 results->depth = info.GetBitsPerPixel(); 1841 results->depth = info.GetBitsPerPixel();
1842 results->depthPerComponent = info.GetBitsPerComponent(); 1842 results->depthPerComponent = info.GetBitsPerComponent();
1843 results->isMonochrome = (results->depthPerComponent == 0); 1843 results->isMonochrome = (results->depthPerComponent == 0);
1844 } 1844 }
1845 1845
1846 } // namespace content 1846 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698