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

Unified Diff: chrome/browser/ui/views/extensions/extension_dialog.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 new addition 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: chrome/browser/ui/views/extensions/extension_dialog.cc
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
index b73427b14f7043608f3f54709b665295f38fda97..c290fc14a3b0d74ca608784dcb6c6d7aaedb2c51 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.cc
+++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
@@ -129,7 +129,7 @@ extensions::ExtensionHost* ExtensionDialog::CreateExtensionHost(
void ExtensionDialog::InitWindowFullscreen() {
aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow();
gfx::Rect screen_rect =
- gfx::Screen::GetDisplayNearestWindow(root_window).bounds();
+ ash::Shell::GetScreen()->GetDisplayNearestWindow(root_window).bounds();
// We want to be the fullscreen topmost child of the root window.
window_ = new views::Widget;
@@ -164,7 +164,8 @@ void ExtensionDialog::InitWindow(BaseWindow* base_window,
int y = center.y() - height / 2;
// Ensure the top left and top right of the window are on screen, with
// priority given to the top left.
- gfx::Rect screen_rect = gfx::Screen::GetDisplayNearestPoint(center).bounds();
+ gfx::Rect screen_rect = gfx::Screen::GetScreenFor(parent)->
+ GetDisplayNearestPoint(center).bounds();
gfx::Rect bounds_rect = gfx::Rect(x, y, width, height);
bounds_rect = bounds_rect.AdjustToFit(screen_rect);
window_->SetBounds(bounds_rect);

Powered by Google App Engine
This is Rietveld 408576698