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/base_window.h" | 10 #include "chrome/browser/ui/base_window.h" |
11 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" | 11 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" |
12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
14 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/render_widget_host_view.h" | 16 #include "content/public/browser/render_widget_host_view.h" |
17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
19 #include "ui/gfx/screen.h" | 19 #include "ui/gfx/screen.h" |
20 #include "ui/views/background.h" | 20 #include "ui/views/background.h" |
21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
22 | 22 |
23 #if defined(USE_ASH) | 23 #if defined(USE_ASH) |
24 #include "ash/shell.h" | 24 #include "ash/shell.h" |
25 #include "ui/aura/root_window.h" | 25 #include "ui/aura/root_window.h" |
26 #endif | 26 #endif |
27 | 27 |
28 using content::WebContents; | 28 using content::WebContents; |
29 using extensions::ExtensionHost; | |
Peter Kasting
2012/07/26 18:13:48
Nit: Another using statement
| |
29 | 30 |
30 ExtensionDialog::ExtensionDialog(ExtensionHost* host, | 31 ExtensionDialog::ExtensionDialog(ExtensionHost* host, |
31 ExtensionDialogObserver* observer) | 32 ExtensionDialogObserver* observer) |
32 : window_(NULL), | 33 : window_(NULL), |
33 extension_host_(host), | 34 extension_host_(host), |
34 observer_(observer) { | 35 observer_(observer) { |
35 AddRef(); // Balanced in DeleteDelegate(); | 36 AddRef(); // Balanced in DeleteDelegate(); |
36 | 37 |
37 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, | 38 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
38 content::Source<Profile>(host->profile())); | 39 content::Source<Profile>(host->profile())); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 if (content::Details<ExtensionHost>(host()) != details) | 275 if (content::Details<ExtensionHost>(host()) != details) |
275 return; | 276 return; |
276 if (observer_) | 277 if (observer_) |
277 observer_->ExtensionTerminated(this); | 278 observer_->ExtensionTerminated(this); |
278 break; | 279 break; |
279 default: | 280 default: |
280 NOTREACHED() << L"Received unexpected notification"; | 281 NOTREACHED() << L"Received unexpected notification"; |
281 break; | 282 break; |
282 } | 283 } |
283 } | 284 } |
OLD | NEW |