Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_android.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
| index 465058141cea64aec560587db61f07169090425a..3628f2549fa8c8d3430edb31388dc75ab306cc03 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
| @@ -28,6 +28,8 @@ |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
| #include "ui/gfx/android/device_display_info.h" |
| #include "ui/gfx/android/java_bitmap.h" |
| +#include "ui/gfx/display.h" |
| +#include "ui/gfx/screen.h" |
| #include "ui/gfx/size_conversions.h" |
| #include "webkit/compositor_bindings/web_compositor_support_impl.h" |
| @@ -627,16 +629,17 @@ void RenderWidgetHostViewAndroid::HasTouchEventHandlers( |
| // static |
| void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| WebKit::WebScreenInfo* results) { |
| + const gfx::Display& display = |
| + gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); |
| + results->rect = display.bounds(); |
| + // TODO(husky): Remove any system controls from availableRect. |
| + results->availableRect = display.work_area(); |
| + results->deviceScaleFactor = display.device_scale_factor(); |
| + |
| gfx::DeviceDisplayInfo info; |
| - const int width = info.GetDisplayWidth(); |
| - const int height = info.GetDisplayHeight(); |
| - results->deviceScaleFactor = info.GetDIPScale(); |
| - results->depth = info.GetBitsPerPixel(); |
| + results->depth = info.GetBitsPerPixel();; |
|
aelias_OOO_until_Jul13
2013/02/15 21:04:08
Typo: extra semicolon
|
| results->depthPerComponent = info.GetBitsPerComponent(); |
| results->isMonochrome = (results->depthPerComponent == 0); |
| - results->rect = WebKit::WebRect(0, 0, width, height); |
| - // TODO(husky): Remove any system controls from availableRect. |
| - results->availableRect = WebKit::WebRect(0, 0, width, height); |
| } |
| //////////////////////////////////////////////////////////////////////////////// |