Chromium Code Reviews| Index: ash/keyboard_overlay/keyboard_overlay_delegate.cc |
| diff --git a/ash/keyboard_overlay/keyboard_overlay_delegate.cc b/ash/keyboard_overlay/keyboard_overlay_delegate.cc |
| index e819a98147358dd29b87850649f86efb4386b19d..dbb83050421d6b4fee59c5481459631028c87d2f 100644 |
| --- a/ash/keyboard_overlay/keyboard_overlay_delegate.cc |
| +++ b/ash/keyboard_overlay/keyboard_overlay_delegate.cc |
| @@ -6,6 +6,7 @@ |
| #include <algorithm> |
| +#include "ash/shell.h" |
| #include "base/bind.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/utf_string_conversions.h" |
| @@ -80,7 +81,7 @@ void KeyboardOverlayDelegate::Show(views::WebDialogView* view) { |
| // Show the widget at the bottom of the work area. |
| gfx::Size size; |
| GetDialogSize(&size); |
| - const gfx::Rect& rect = gfx::Screen::GetDisplayNearestWindow( |
| + const gfx::Rect& rect = ash::Shell::GetAshScreen()->GetDisplayNearestWindow( |
|
oshima
2012/10/10 17:58:23
this class should be in ash namespace. (confirmed
scottmg
2012/10/10 19:04:47
Done.
|
| widget->GetNativeView()).work_area(); |
| gfx::Rect bounds((rect.width() - size.width()) / 2, |
| rect.height() - size.height(), |
| @@ -112,7 +113,7 @@ void KeyboardOverlayDelegate::GetDialogSize( |
| gfx::Size* size) const { |
| using std::min; |
| DCHECK(view_); |
| - gfx::Rect rect = gfx::Screen::GetDisplayNearestWindow( |
| + gfx::Rect rect = ash::Shell::GetAshScreen()->GetDisplayNearestWindow( |
| view_->GetWidget()->GetNativeView()).bounds(); |
| const int width = min(kBaseWidth, rect.width() - kHorizontalMargin); |
| const int height = width * kBaseHeight / kBaseWidth; |