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