Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool ExtensionDialog::ShouldShowWindowTitle() const { | 134 bool ExtensionDialog::ShouldShowWindowTitle() const { |
| 135 return !window_title_.empty(); | 135 return !window_title_.empty(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 string16 ExtensionDialog::GetWindowTitle() const { | 138 string16 ExtensionDialog::GetWindowTitle() const { |
| 139 return window_title_; | 139 return window_title_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 void ExtensionDialog::WindowClosing() { | |
| 143 Close(); | |
|
flackr
2011/11/28 16:46:55
This doesn't seem correct to me. The window is alr
bshe
2011/11/28 18:40:26
Done
On 2011/11/28 16:46:55, flackr wrote:
| |
| 144 } | |
| 145 | |
| 142 void ExtensionDialog::DeleteDelegate() { | 146 void ExtensionDialog::DeleteDelegate() { |
| 143 // The window has finished closing. Allow ourself to be deleted. | 147 // The window has finished closing. Allow ourself to be deleted. |
| 144 Release(); | 148 Release(); |
| 145 } | 149 } |
| 146 | 150 |
| 147 views::Widget* ExtensionDialog::GetWidget() { | 151 views::Widget* ExtensionDialog::GetWidget() { |
| 148 return extension_host_->view()->GetWidget(); | 152 return extension_host_->view()->GetWidget(); |
| 149 } | 153 } |
| 150 | 154 |
| 151 const views::Widget* ExtensionDialog::GetWidget() const { | 155 const views::Widget* ExtensionDialog::GetWidget() const { |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 167 // If we aren't the host of the popup, then disregard the notification. | 171 // If we aren't the host of the popup, then disregard the notification. |
| 168 if (content::Details<ExtensionHost>(host()) != details) | 172 if (content::Details<ExtensionHost>(host()) != details) |
| 169 return; | 173 return; |
| 170 Close(); | 174 Close(); |
| 171 break; | 175 break; |
| 172 default: | 176 default: |
| 173 NOTREACHED() << L"Received unexpected notification"; | 177 NOTREACHED() << L"Received unexpected notification"; |
| 174 break; | 178 break; |
| 175 } | 179 } |
| 176 } | 180 } |
| OLD | NEW |