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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |