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