| OLD | NEW |
| 1 // Copyright (c) 2011 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_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> |
| 11 | 11 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const ExtensionViewGtk* view() const { return view_.get(); } | 64 const ExtensionViewGtk* view() const { return view_.get(); } |
| 65 ExtensionViewGtk* view() { return view_.get(); } | 65 ExtensionViewGtk* view() { return view_.get(); } |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 // Create an ExtensionView and tie it to this host and |browser|. Note NULL | 68 // Create an ExtensionView and tie it to this host and |browser|. Note NULL |
| 69 // is a valid argument for |browser|. Extension views may be bound to | 69 // is a valid argument for |browser|. Extension views may be bound to |
| 70 // tab-contents hosted in ExternalTabContainer objects, which do not | 70 // tab-contents hosted in ExternalTabContainer objects, which do not |
| 71 // instantiate Browser objects. | 71 // instantiate Browser objects. |
| 72 void CreateView(Browser* browser); | 72 void CreateView(Browser* browser); |
| 73 | 73 |
| 74 // Helper variant of the above for cases where no Browser is present. |
| 75 void CreateViewWithoutBrowser(); |
| 76 |
| 74 const Extension* extension() const { return extension_; } | 77 const Extension* extension() const { return extension_; } |
| 75 const std::string& extension_id() const { return extension_id_; } | 78 const std::string& extension_id() const { return extension_id_; } |
| 76 content::WebContents* host_contents() const { return host_contents_.get(); } | 79 content::WebContents* host_contents() const { return host_contents_.get(); } |
| 77 RenderViewHost* render_view_host() const; | 80 RenderViewHost* render_view_host() const; |
| 78 content::RenderProcessHost* render_process_host() const; | 81 content::RenderProcessHost* render_process_host() const; |
| 79 bool did_stop_loading() const { return did_stop_loading_; } | 82 bool did_stop_loading() const { return did_stop_loading_; } |
| 80 bool document_element_available() const { | 83 bool document_element_available() const { |
| 81 return document_element_available_; | 84 return document_element_available_; |
| 82 } | 85 } |
| 83 | 86 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // The relevant WebContents associated with this ExtensionHost, if any. | 228 // The relevant WebContents associated with this ExtensionHost, if any. |
| 226 content::WebContents* associated_web_contents_; | 229 content::WebContents* associated_web_contents_; |
| 227 | 230 |
| 228 // Used to measure how long it's been since the host was created. | 231 // Used to measure how long it's been since the host was created. |
| 229 PerfTimer since_created_; | 232 PerfTimer since_created_; |
| 230 | 233 |
| 231 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 234 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 232 }; | 235 }; |
| 233 | 236 |
| 234 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 237 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |