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

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

Issue 481683003: Support for Adaptive Handle Orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 7 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 bool is_mobile_optimized = IsMobileOptimizedFrame(frame_metadata); 1447 bool is_mobile_optimized = IsMobileOptimizedFrame(frame_metadata);
1448 gesture_provider_.SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); 1448 gesture_provider_.SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);
1449 1449
1450 if (!content_view_core_) 1450 if (!content_view_core_)
1451 return; 1451 return;
1452 1452
1453 if (overscroll_controller_) 1453 if (overscroll_controller_)
1454 overscroll_controller_->OnFrameMetadataUpdated(frame_metadata); 1454 overscroll_controller_->OnFrameMetadataUpdated(frame_metadata);
1455 1455
1456 if (selection_controller_) { 1456 if (selection_controller_) {
1457 gfx::SizeF view_size(frame_metadata.scrollable_viewport_size);
mfomitchev 2015/05/13 22:19:14 Nit: Rename this to viewport_size for consistency?
AviD 2015/05/19 16:26:27 Done.
1458 view_size.Scale(frame_metadata.page_scale_factor);
1459 gfx::RectF viewport_rect(frame_metadata.location_bar_offset.x(),
1460 frame_metadata.location_bar_offset.y(),
1461 view_size.width(), view_size.height());
1462 selection_controller_->OnViewportChanged(viewport_rect);
1457 selection_controller_->OnSelectionBoundsChanged( 1463 selection_controller_->OnSelectionBoundsChanged(
1458 ConvertSelectionBound(frame_metadata.selection_start), 1464 ConvertSelectionBound(frame_metadata.selection_start),
1459 ConvertSelectionBound(frame_metadata.selection_end)); 1465 ConvertSelectionBound(frame_metadata.selection_end));
1460 } 1466 }
1461 1467
1462 // All offsets and sizes are in CSS pixels. 1468 // All offsets and sizes are in CSS pixels.
1463 content_view_core_->UpdateFrameInfo( 1469 content_view_core_->UpdateFrameInfo(
1464 frame_metadata.root_scroll_offset, 1470 frame_metadata.root_scroll_offset,
1465 frame_metadata.page_scale_factor, 1471 frame_metadata.page_scale_factor,
1466 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1472 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 results->orientationAngle = display.RotationAsDegree(); 2053 results->orientationAngle = display.RotationAsDegree();
2048 results->orientationType = 2054 results->orientationType =
2049 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2055 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2050 gfx::DeviceDisplayInfo info; 2056 gfx::DeviceDisplayInfo info;
2051 results->depth = info.GetBitsPerPixel(); 2057 results->depth = info.GetBitsPerPixel();
2052 results->depthPerComponent = info.GetBitsPerComponent(); 2058 results->depthPerComponent = info.GetBitsPerComponent();
2053 results->isMonochrome = (results->depthPerComponent == 0); 2059 results->isMonochrome = (results->depthPerComponent == 0);
2054 } 2060 }
2055 2061
2056 } // namespace content 2062 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698