| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 private: | 113 private: |
| 114 // Whether to allow DOM automation for created RenderViewHosts. This is used | 114 // Whether to allow DOM automation for created RenderViewHosts. This is used |
| 115 // for testing. | 115 // for testing. |
| 116 static bool enable_dom_automation_; | 116 static bool enable_dom_automation_; |
| 117 | 117 |
| 118 // ExtensionFunctionDispatcher::Delegate | 118 // ExtensionFunctionDispatcher::Delegate |
| 119 // If this ExtensionHost has a view, this returns the Browser that view is a | 119 // If this ExtensionHost has a view, this returns the Browser that view is a |
| 120 // part of. If this is a global background page, we use the active Browser | 120 // part of. If this is a global background page, we use the active Browser |
| 121 // instead. | 121 // instead. |
| 122 virtual Browser* GetBrowser(); | 122 virtual Browser* GetBrowser(); |
| 123 virtual ExtensionHost* GetHost() { return this; } |
| 123 | 124 |
| 124 // The extension that we're hosting in this view. | 125 // The extension that we're hosting in this view. |
| 125 Extension* extension_; | 126 Extension* extension_; |
| 126 | 127 |
| 127 // The profile that this host is tied to. | 128 // The profile that this host is tied to. |
| 128 Profile* profile_; | 129 Profile* profile_; |
| 129 | 130 |
| 130 #if defined(TOOLKIT_VIEWS) | 131 #if defined(TOOLKIT_VIEWS) |
| 131 // Optional view that shows the rendered content in the UI. | 132 // Optional view that shows the rendered content in the UI. |
| 132 scoped_ptr<ExtensionView> view_; | 133 scoped_ptr<ExtensionView> view_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 143 | 144 |
| 144 // The URL being hosted. | 145 // The URL being hosted. |
| 145 GURL url_; | 146 GURL url_; |
| 146 | 147 |
| 147 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; | 148 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; |
| 148 | 149 |
| 149 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 150 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 153 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |