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" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual bool ShouldShowWindowTitle() const OVERRIDE; | 60 virtual bool ShouldShowWindowTitle() const OVERRIDE; |
61 virtual string16 GetWindowTitle() const OVERRIDE; | 61 virtual string16 GetWindowTitle() const OVERRIDE; |
62 virtual void DeleteDelegate() OVERRIDE; | 62 virtual void DeleteDelegate() OVERRIDE; |
63 virtual views::Widget* GetWidget() OVERRIDE; | 63 virtual views::Widget* GetWidget() OVERRIDE; |
64 virtual const views::Widget* GetWidget() const OVERRIDE; | 64 virtual const views::Widget* GetWidget() const OVERRIDE; |
65 virtual views::View* GetContentsView() OVERRIDE; | 65 virtual views::View* GetContentsView() OVERRIDE; |
66 | 66 |
67 // content::NotificationObserver overrides. | 67 // content::NotificationObserver overrides. |
68 virtual void Observe(int type, | 68 virtual void Observe(int type, |
69 const content::NotificationSource& source, | 69 const content::NotificationSource& source, |
70 const content::NotificationDetails& details); | 70 const content::NotificationDetails& details) OVERRIDE; |
71 | 71 |
72 private: | 72 private: |
73 // Use Show() to create instances. | 73 // Use Show() to create instances. |
74 ExtensionDialog(ExtensionHost* host, ExtensionDialogObserver* observer); | 74 ExtensionDialog(ExtensionHost* host, ExtensionDialogObserver* observer); |
75 | 75 |
76 static ExtensionHost* CreateExtensionHost(const GURL& url, | 76 static ExtensionHost* CreateExtensionHost(const GURL& url, |
77 Browser* browser); | 77 Browser* browser); |
78 | 78 |
79 void InitWindow(Browser* browser, int width, int height); | 79 void InitWindow(Browser* browser, int width, int height); |
80 | 80 |
81 // Window that holds the extension host view. | 81 // Window that holds the extension host view. |
82 views::Widget* window_; | 82 views::Widget* window_; |
83 | 83 |
84 // Window Title | 84 // Window Title |
85 string16 window_title_; | 85 string16 window_title_; |
86 | 86 |
87 // The contained host for the view. | 87 // The contained host for the view. |
88 scoped_ptr<ExtensionHost> extension_host_; | 88 scoped_ptr<ExtensionHost> extension_host_; |
89 | 89 |
90 content::NotificationRegistrar registrar_; | 90 content::NotificationRegistrar registrar_; |
91 | 91 |
92 // The observer of this popup. | 92 // The observer of this popup. |
93 ExtensionDialogObserver* observer_; | 93 ExtensionDialogObserver* observer_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); | 95 DISALLOW_COPY_AND_ASSIGN(ExtensionDialog); |
96 }; | 96 }; |
97 | 97 |
98 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ | 98 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_DIALOG_H_ |
OLD | NEW |