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); |