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

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

Issue 996373002: Add Aura handles to be used in unified touch selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed issues with loading resources Created 5 years, 9 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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 bool is_mobile_optimized = IsMobileOptimizedFrame(frame_metadata); 1341 bool is_mobile_optimized = IsMobileOptimizedFrame(frame_metadata);
1342 gesture_provider_.SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); 1342 gesture_provider_.SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);
1343 1343
1344 if (!content_view_core_) 1344 if (!content_view_core_)
1345 return; 1345 return;
1346 1346
1347 if (overscroll_controller_) 1347 if (overscroll_controller_)
1348 overscroll_controller_->OnFrameMetadataUpdated(frame_metadata); 1348 overscroll_controller_->OnFrameMetadataUpdated(frame_metadata);
1349 1349
1350 if (selection_controller_) { 1350 if (selection_controller_) {
1351 selection_controller_->OnSelectionBoundsChanged( 1351 selection_controller_->OnSelectionBoundsUpdated(
1352 ConvertSelectionBound(frame_metadata.selection_start), 1352 ConvertSelectionBound(frame_metadata.selection_start),
1353 ConvertSelectionBound(frame_metadata.selection_end)); 1353 ConvertSelectionBound(frame_metadata.selection_end));
1354 } 1354 }
1355 1355
1356 // All offsets and sizes are in CSS pixels. 1356 // All offsets and sizes are in CSS pixels.
1357 content_view_core_->UpdateFrameInfo( 1357 content_view_core_->UpdateFrameInfo(
1358 frame_metadata.root_scroll_offset, 1358 frame_metadata.root_scroll_offset,
1359 frame_metadata.page_scale_factor, 1359 frame_metadata.page_scale_factor,
1360 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1360 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
1361 frame_metadata.max_page_scale_factor), 1361 frame_metadata.max_page_scale_factor),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 // of the region have been updated, explicitly set the properties now. 1661 // of the region have been updated, explicitly set the properties now.
1662 // TODO(jdduke): Remove this workaround when auxiliary paste popup 1662 // TODO(jdduke): Remove this workaround when auxiliary paste popup
1663 // notifications are no longer required, crbug.com/398170. 1663 // notifications are no longer required, crbug.com/398170.
1664 ui::SelectionBound insertion_bound; 1664 ui::SelectionBound insertion_bound;
1665 insertion_bound.set_type(ui::SelectionBound::CENTER); 1665 insertion_bound.set_type(ui::SelectionBound::CENTER);
1666 insertion_bound.set_visible(true); 1666 insertion_bound.set_visible(true);
1667 insertion_bound.SetEdge(point, point); 1667 insertion_bound.SetEdge(point, point);
1668 selection_controller_->HideAndDisallowShowingAutomatically(); 1668 selection_controller_->HideAndDisallowShowingAutomatically();
1669 selection_controller_->OnSelectionEditable(true); 1669 selection_controller_->OnSelectionEditable(true);
1670 selection_controller_->OnSelectionEmpty(true); 1670 selection_controller_->OnSelectionEmpty(true);
1671 selection_controller_->OnSelectionBoundsChanged(insertion_bound, 1671 selection_controller_->OnSelectionBoundsUpdated(insertion_bound,
1672 insertion_bound); 1672 insertion_bound);
1673 selection_controller_->AllowShowingFromCurrentSelection(); 1673 selection_controller_->AllowShowingFromCurrentSelection();
1674 } 1674 }
1675 1675
1676 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const { 1676 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const {
1677 return cached_background_color_; 1677 return cached_background_color_;
1678 } 1678 }
1679 1679
1680 void RenderWidgetHostViewAndroid::DidOverscroll( 1680 void RenderWidgetHostViewAndroid::DidOverscroll(
1681 const DidOverscrollParams& params) { 1681 const DidOverscrollParams& params) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 results->orientationAngle = display.RotationAsDegree(); 1940 results->orientationAngle = display.RotationAsDegree();
1941 results->orientationType = 1941 results->orientationType =
1942 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1942 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1943 gfx::DeviceDisplayInfo info; 1943 gfx::DeviceDisplayInfo info;
1944 results->depth = info.GetBitsPerPixel(); 1944 results->depth = info.GetBitsPerPixel();
1945 results->depthPerComponent = info.GetBitsPerComponent(); 1945 results->depthPerComponent = info.GetBitsPerComponent();
1946 results->isMonochrome = (results->depthPerComponent == 0); 1946 results->isMonochrome = (results->depthPerComponent == 0);
1947 } 1947 }
1948 1948
1949 } // namespace content 1949 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/resources/ui_resources.grd » ('j') | ui/touch_selection/touch_selection_controller_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698