| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 manager = browser->profile()->GetExtensionProcessManager(); | 123 manager = browser->profile()->GetExtensionProcessManager(); |
| 124 | 124 |
| 125 DCHECK(manager); | 125 DCHECK(manager); |
| 126 if (!manager) | 126 if (!manager) |
| 127 return NULL; | 127 return NULL; |
| 128 return manager->CreateDialogHost(url, browser); | 128 return manager->CreateDialogHost(url, browser); |
| 129 } | 129 } |
| 130 | 130 |
| 131 #if defined(USE_AURA) | 131 #if defined(USE_AURA) |
| 132 void ExtensionDialog::InitWindowFullscreen() { | 132 void ExtensionDialog::InitWindowFullscreen() { |
| 133 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); | 133 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); |
| 134 gfx::Rect screen_rect = | 134 gfx::Rect screen_rect = |
| 135 gfx::Screen::GetMonitorNearestWindow(root_window).bounds(); | 135 gfx::Screen::GetMonitorNearestWindow(root_window).bounds(); |
| 136 | 136 |
| 137 // We want to be the fullscreen topmost child of the root window. | 137 // We want to be the fullscreen topmost child of the root window. |
| 138 window_ = new views::Widget; | 138 window_ = new views::Widget; |
| 139 views::Widget::InitParams params( | 139 views::Widget::InitParams params( |
| 140 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 140 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 141 params.delegate = this; | 141 params.delegate = this; |
| 142 params.parent = root_window; | 142 params.parent = root_window; |
| 143 window_->Init(params); | 143 window_->Init(params); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 if (content::Details<ExtensionHost>(host()) != details) | 262 if (content::Details<ExtensionHost>(host()) != details) |
| 263 return; | 263 return; |
| 264 if (observer_) | 264 if (observer_) |
| 265 observer_->ExtensionTerminated(this); | 265 observer_->ExtensionTerminated(this); |
| 266 break; | 266 break; |
| 267 default: | 267 default: |
| 268 NOTREACHED() << L"Received unexpected notification"; | 268 NOTREACHED() << L"Received unexpected notification"; |
| 269 break; | 269 break; |
| 270 } | 270 } |
| 271 } | 271 } |
| OLD | NEW |