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

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

Issue 336313011: Android: compute screen orientation type in the RWHV. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_fullscreen
Patch Set: fix mac build Created 6 years, 6 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/browser/renderer_host/render_widget_host_view_aura.cc » ('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/sys_utils.h" 9 #include "base/android/sys_utils.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 // static 1437 // static
1438 void RenderWidgetHostViewBase::GetDefaultScreenInfo( 1438 void RenderWidgetHostViewBase::GetDefaultScreenInfo(
1439 blink::WebScreenInfo* results) { 1439 blink::WebScreenInfo* results) {
1440 const gfx::Display& display = 1440 const gfx::Display& display =
1441 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 1441 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
1442 results->rect = display.bounds(); 1442 results->rect = display.bounds();
1443 // TODO(husky): Remove any system controls from availableRect. 1443 // TODO(husky): Remove any system controls from availableRect.
1444 results->availableRect = display.work_area(); 1444 results->availableRect = display.work_area();
1445 results->deviceScaleFactor = display.device_scale_factor(); 1445 results->deviceScaleFactor = display.device_scale_factor();
1446 results->orientationAngle = display.RotationAsDegree(); 1446 results->orientationAngle = display.RotationAsDegree();
1447 results->orientationType =
1448 RenderWidgetHostViewBase::GetOrientationTypeFromDisplay(display);
1447 gfx::DeviceDisplayInfo info; 1449 gfx::DeviceDisplayInfo info;
1448 results->depth = info.GetBitsPerPixel(); 1450 results->depth = info.GetBitsPerPixel();
1449 results->depthPerComponent = info.GetBitsPerComponent(); 1451 results->depthPerComponent = info.GetBitsPerComponent();
1450 results->isMonochrome = (results->depthPerComponent == 0); 1452 results->isMonochrome = (results->depthPerComponent == 0);
1451 } 1453 }
1452 1454
1453 } // namespace content 1455 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698