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

Unified Diff: ash/keyboard_overlay/keyboard_overlay_delegate.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698