| 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 #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 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 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 BaseWindow; | 14 class BaseWindow; |
| 15 class ExtensionDialogObserver; | 15 class ExtensionDialogObserver; |
| 16 class GURL; | 16 class GURL; |
| 17 class Profile; | 17 class Profile; |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class WebContents; | 20 class WebContents; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 class ExtensionHost; | 24 class ExtensionHost; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class ExtensionViewViews; | |
| 28 | |
| 29 // Modal dialog containing contents provided by an extension. | 27 // Modal dialog containing contents provided by an extension. |
| 30 // Dialog is automatically centered in the owning window and has fixed size. | 28 // Dialog is automatically centered in the owning window and has fixed size. |
| 31 // For example, used by the Chrome OS file browser. | 29 // For example, used by the Chrome OS file browser. |
| 32 class ExtensionDialog : public views::WidgetDelegate, | 30 class ExtensionDialog : public views::WidgetDelegate, |
| 33 public content::NotificationObserver, | 31 public content::NotificationObserver, |
| 34 public base::RefCounted<ExtensionDialog> { | 32 public base::RefCounted<ExtensionDialog> { |
| 35 public: | 33 public: |
| 36 // Create and show a dialog with |url| centered over the provided window. | 34 // Create and show a dialog with |url| centered over the provided window. |
| 37 // |base_window| is the window to which the pop-up will be attached. | 35 // |base_window| is the window to which the pop-up will be attached. |
| 38 // |profile| is the profile that the extension is registered with. | 36 // |profile| is the profile that the extension is registered with. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 string16 window_title_; | 129 string16 window_title_; |
| 132 | 130 |
| 133 // The contained host for the view. | 131 // The contained host for the view. |
| 134 scoped_ptr<extensions::ExtensionHost> extension_host_; | 132 scoped_ptr<extensions::ExtensionHost> extension_host_; |
| 135 | 133 |
| 136 content::NotificationRegistrar registrar_; | 134 content::NotificationRegistrar registrar_; |
| 137 | 135 |
| 138 // The observer of this popup. | 136 // The observer of this popup. |
| 139 ExtensionDialogObserver* observer_; | 137 ExtensionDialogObserver* observer_; |
| 140 | 138 |
| 141 ExtensionViewViews* view_; | |
| 142 | |
| 143 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); | 139 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); |
| 144 }; | 140 }; |
| 145 | 141 |
| 146 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 142 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
| OLD | NEW |