| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/extensions/extension_dialog.h" | 5 #include "chrome/browser/ui/views/extensions/extension_dialog.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
| 8 #include "chrome/browser/extensions/extension_process_manager.h" | 8 #include "chrome/browser/extensions/extension_process_manager.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 DCHECK(manager); | 127 DCHECK(manager); |
| 128 if (!manager) | 128 if (!manager) |
| 129 return NULL; | 129 return NULL; |
| 130 return manager->CreateDialogHost(url, browser); | 130 return manager->CreateDialogHost(url, browser); |
| 131 } | 131 } |
| 132 | 132 |
| 133 #if defined(USE_AURA) | 133 #if defined(USE_AURA) |
| 134 void ExtensionDialog::InitWindowFullscreen() { | 134 void ExtensionDialog::InitWindowFullscreen() { |
| 135 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); | 135 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); |
| 136 gfx::Rect screen_rect = | 136 gfx::Rect screen_rect = |
| 137 gfx::Screen::GetMonitorAreaNearestWindow(root_window); | 137 gfx::Screen::GetMonitorNearestWindow(root_window).bounds(); |
| 138 | 138 |
| 139 // We want to be the fullscreen topmost child of the root window. | 139 // We want to be the fullscreen topmost child of the root window. |
| 140 window_ = browser::CreateFramelessViewsWindow(root_window, this); | 140 window_ = browser::CreateFramelessViewsWindow(root_window, this); |
| 141 window_->StackAtTop(); | 141 window_->StackAtTop(); |
| 142 window_->SetBounds(screen_rect); | 142 window_->SetBounds(screen_rect); |
| 143 window_->Show(); | 143 window_->Show(); |
| 144 | 144 |
| 145 // TODO(jamescook): Remove redundant call to Activate()? | 145 // TODO(jamescook): Remove redundant call to Activate()? |
| 146 window_->Activate(); | 146 window_->Activate(); |
| 147 } | 147 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 if (content::Details<ExtensionHost>(host()) != details) | 259 if (content::Details<ExtensionHost>(host()) != details) |
| 260 return; | 260 return; |
| 261 if (observer_) | 261 if (observer_) |
| 262 observer_->ExtensionTerminated(this); | 262 observer_->ExtensionTerminated(this); |
| 263 break; | 263 break; |
| 264 default: | 264 default: |
| 265 NOTREACHED() << L"Received unexpected notification"; | 265 NOTREACHED() << L"Received unexpected notification"; |
| 266 break; | 266 break; |
| 267 } | 267 } |
| 268 } | 268 } |
| OLD | NEW |