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); | |
200 | |
201 // Internal functions used to support the CreateNewWidget() method. If a | 198 // Internal functions used to support the CreateNewWidget() method. If a |
202 // platform requires plugging into widget creation at a lower level, then a | 199 // platform requires plugging into widget creation at a lower level, then a |
203 // subclass might want to override these functions, but otherwise they should | 200 // subclass might want to override these functions, but otherwise they should |
204 // be fine just implementing RenderWidgetHostView::InitAsPopup(). | 201 // be fine just implementing RenderWidgetHostView::InitAsPopup(). |
205 // | 202 // |
206 // The Create function returns the newly created widget so it can be | 203 // The Create function returns the newly created widget so it can be |
207 // associated with the given route. When the widget needs to be shown later, | 204 // associated with the given route. When the widget needs to be shown later, |
208 // we'll look it up again and pass the object to the Show functions rather | 205 // we'll look it up again and pass the object to the Show functions rather |
209 // than the route ID. | 206 // than the route ID. |
210 virtual RenderWidgetHostView* CreateNewWidgetInternal( | 207 virtual RenderWidgetHostView* CreateNewWidgetInternal( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // The relevant TabContents associated with this ExtensionHost, if any. | 282 // The relevant TabContents associated with this ExtensionHost, if any. |
286 TabContents* associated_tab_contents_; | 283 TabContents* associated_tab_contents_; |
287 | 284 |
288 // Used to measure how long it's been since the host was created. | 285 // Used to measure how long it's been since the host was created. |
289 PerfTimer since_created_; | 286 PerfTimer since_created_; |
290 | 287 |
291 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 288 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
292 }; | 289 }; |
293 | 290 |
294 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 291 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
OLD | NEW |