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_EXTENSIONS_EXTENSION_HOST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 const NotificationSource& source, | 188 const NotificationSource& source, |
189 const NotificationDetails& details) OVERRIDE; | 189 const NotificationDetails& details) OVERRIDE; |
190 | 190 |
191 // Overridden from content::JavaScriptDialogDelegate: | 191 // Overridden from content::JavaScriptDialogDelegate: |
192 virtual void OnDialogClosed(IPC::Message* reply_msg, | 192 virtual void OnDialogClosed(IPC::Message* reply_msg, |
193 bool success, | 193 bool success, |
194 const string16& user_input) OVERRIDE; | 194 const string16& user_input) OVERRIDE; |
195 virtual gfx::NativeWindow GetDialogRootWindow() OVERRIDE; | 195 virtual gfx::NativeWindow GetDialogRootWindow() OVERRIDE; |
196 | 196 |
197 protected: | 197 protected: |
198 // This should only be used by unit tests. | |
199 ExtensionHost(const Extension* extension, content::ViewType host_type); | |
jar (doing other things)
2011/10/15 02:43:40
Should you consider making this private, and then
| |
200 | |
198 // Internal functions used to support the CreateNewWidget() method. If a | 201 // Internal functions used to support the CreateNewWidget() method. If a |
199 // platform requires plugging into widget creation at a lower level, then a | 202 // platform requires plugging into widget creation at a lower level, then a |
200 // subclass might want to override these functions, but otherwise they should | 203 // subclass might want to override these functions, but otherwise they should |
201 // be fine just implementing RenderWidgetHostView::InitAsPopup(). | 204 // be fine just implementing RenderWidgetHostView::InitAsPopup(). |
202 // | 205 // |
203 // The Create function returns the newly created widget so it can be | 206 // The Create function returns the newly created widget so it can be |
204 // associated with the given route. When the widget needs to be shown later, | 207 // associated with the given route. When the widget needs to be shown later, |
205 // we'll look it up again and pass the object to the Show functions rather | 208 // we'll look it up again and pass the object to the Show functions rather |
206 // than the route ID. | 209 // than the route ID. |
207 virtual RenderWidgetHostView* CreateNewWidgetInternal( | 210 virtual RenderWidgetHostView* CreateNewWidgetInternal( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 // The relevant TabContents associated with this ExtensionHost, if any. | 285 // The relevant TabContents associated with this ExtensionHost, if any. |
283 TabContents* associated_tab_contents_; | 286 TabContents* associated_tab_contents_; |
284 | 287 |
285 // Used to measure how long it's been since the host was created. | 288 // Used to measure how long it's been since the host was created. |
286 PerfTimer since_created_; | 289 PerfTimer since_created_; |
287 | 290 |
288 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 291 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
289 }; | 292 }; |
290 | 293 |
291 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 294 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
OLD | NEW |