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 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 #include "ui/views/widget/widget_delegate.h" | 12 #include "ui/views/widget/widget_delegate.h" |
13 | 13 |
14 class Browser; | 14 class Browser; |
15 class ExtensionDialogObserver; | 15 class ExtensionDialogObserver; |
16 class ExtensionHost; | 16 class ExtensionHost; |
17 class GURL; | 17 class GURL; |
18 class TabContents; | 18 class TabContents; |
19 | 19 |
20 namespace views { | |
21 class View; | |
22 class Widget; | |
23 } | |
24 | |
25 // Modal dialog containing contents provided by an extension. | 20 // Modal dialog containing contents provided by an extension. |
26 // Dialog is automatically centered in the browser window and has fixed size. | 21 // Dialog is automatically centered in the browser window and has fixed size. |
27 // For example, used by the Chrome OS file browser. | 22 // For example, used by the Chrome OS file browser. |
28 class ExtensionDialog : public views::WidgetDelegate, | 23 class ExtensionDialog : public views::WidgetDelegate, |
29 public content::NotificationObserver, | 24 public content::NotificationObserver, |
30 public base::RefCounted<ExtensionDialog> { | 25 public base::RefCounted<ExtensionDialog> { |
31 public: | 26 public: |
32 virtual ~ExtensionDialog(); | 27 virtual ~ExtensionDialog(); |
33 | 28 |
34 // Create and show a dialog with |url| centered over the browser window. | 29 // Create and show a dialog with |url| centered over the browser window. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 85 |
91 content::NotificationRegistrar registrar_; | 86 content::NotificationRegistrar registrar_; |
92 | 87 |
93 // The observer of this popup. | 88 // The observer of this popup. |
94 ExtensionDialogObserver* observer_; | 89 ExtensionDialogObserver* observer_; |
95 | 90 |
96 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); | 91 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); |
97 }; | 92 }; |
98 | 93 |
99 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 94 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
OLD | NEW |