| 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" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 int height, | 47 int height, |
| 48 int min_width, | 48 int min_width, |
| 49 int min_height, | 49 int min_height, |
| 50 const string16& title, | 50 const string16& title, |
| 51 ExtensionDialogObserver* observer); | 51 ExtensionDialogObserver* observer); |
| 52 | 52 |
| 53 // Notifies the dialog that the observer has been destroyed and should not | 53 // Notifies the dialog that the observer has been destroyed and should not |
| 54 // be sent notifications. | 54 // be sent notifications. |
| 55 void ObserverDestroyed(); | 55 void ObserverDestroyed(); |
| 56 | 56 |
| 57 // Closes the ExtensionDialog. | |
| 58 void Close(); | |
| 59 | |
| 60 // Focus to the render view if possible. | 57 // Focus to the render view if possible. |
| 61 void MaybeFocusRenderView(); | 58 void MaybeFocusRenderView(); |
| 62 | 59 |
| 63 // Sets the window title. | 60 // Sets the window title. |
| 64 void set_title(const string16& title) { window_title_ = title; } | 61 void set_title(const string16& title) { window_title_ = title; } |
| 65 | 62 |
| 66 // Sets minimum contents size in pixels and makes the window resizable. | 63 // Sets minimum contents size in pixels and makes the window resizable. |
| 67 void SetMinimumContentsSize(int width, int height); | 64 void SetMinimumContentsSize(int width, int height); |
| 68 | 65 |
| 69 extensions::ExtensionHost* host() const { return extension_host_.get(); } | 66 extensions::ExtensionHost* host() const { return extension_host_.get(); } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 int width, | 99 int width, |
| 103 int height, | 100 int height, |
| 104 const string16& title, | 101 const string16& title, |
| 105 ExtensionDialogObserver* observer); | 102 ExtensionDialogObserver* observer); |
| 106 | 103 |
| 107 static extensions::ExtensionHost* CreateExtensionHost(const GURL& url, | 104 static extensions::ExtensionHost* CreateExtensionHost(const GURL& url, |
| 108 Profile* profile); | 105 Profile* profile); |
| 109 | 106 |
| 110 void InitWindow(ui::BaseWindow* base_window, int width, int height); | 107 void InitWindow(ui::BaseWindow* base_window, int width, int height); |
| 111 | 108 |
| 112 // Window that holds the extension host view. | |
| 113 views::Widget* window_; | |
| 114 | |
| 115 // Window Title | 109 // Window Title |
| 116 string16 window_title_; | 110 string16 window_title_; |
| 117 | 111 |
| 118 // The contained host for the view. | 112 // The contained host for the view. |
| 119 scoped_ptr<extensions::ExtensionHost> extension_host_; | 113 scoped_ptr<extensions::ExtensionHost> extension_host_; |
| 120 | 114 |
| 121 content::NotificationRegistrar registrar_; | 115 content::NotificationRegistrar registrar_; |
| 122 | 116 |
| 123 // The observer of this popup. | 117 // The observer of this popup. |
| 124 ExtensionDialogObserver* observer_; | 118 ExtensionDialogObserver* observer_; |
| 125 | 119 |
| 126 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); | 120 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); |
| 127 }; | 121 }; |
| 128 | 122 |
| 129 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 123 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
| OLD | NEW |