| OLD | NEW |
| 1 // Copyright (c) 2012 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_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 int world_id); | 82 int world_id); |
| 83 | 83 |
| 84 void DidCreateScriptContext(WebKit::WebFrame* frame, | 84 void DidCreateScriptContext(WebKit::WebFrame* frame, |
| 85 v8::Handle<v8::Context> context, | 85 v8::Handle<v8::Context> context, |
| 86 int extension_group, | 86 int extension_group, |
| 87 int world_id); | 87 int world_id); |
| 88 void WillReleaseScriptContext(WebKit::WebFrame* frame, | 88 void WillReleaseScriptContext(WebKit::WebFrame* frame, |
| 89 v8::Handle<v8::Context> context, | 89 v8::Handle<v8::Context> context, |
| 90 int world_id); | 90 int world_id); |
| 91 | 91 |
| 92 void SetTestExtensionId(const std::string& extension_id); | |
| 93 bool IsTestExtensionId(const std::string& id); | |
| 94 | |
| 95 // TODO(mpcomplete): remove. http://crbug.com/100411 | 92 // TODO(mpcomplete): remove. http://crbug.com/100411 |
| 96 bool IsAdblockWithWebRequestInstalled() const { | 93 bool IsAdblockWithWebRequestInstalled() const { |
| 97 return webrequest_adblock_; | 94 return webrequest_adblock_; |
| 98 } | 95 } |
| 99 bool IsAdblockPlusWithWebRequestInstalled() const { | 96 bool IsAdblockPlusWithWebRequestInstalled() const { |
| 100 return webrequest_adblock_plus_; | 97 return webrequest_adblock_plus_; |
| 101 } | 98 } |
| 102 bool IsOtherExtensionWithWebRequestInstalled() const { | 99 bool IsOtherExtensionWithWebRequestInstalled() const { |
| 103 return webrequest_other_; | 100 return webrequest_other_; |
| 104 } | 101 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 212 |
| 216 // All declared function names. | 213 // All declared function names. |
| 217 std::set<std::string> function_names_; | 214 std::set<std::string> function_names_; |
| 218 | 215 |
| 219 // The extensions and apps that are active in this process. | 216 // The extensions and apps that are active in this process. |
| 220 std::set<std::string> active_extension_ids_; | 217 std::set<std::string> active_extension_ids_; |
| 221 | 218 |
| 222 // True once WebKit has been initialized (and it is therefore safe to poke). | 219 // True once WebKit has been initialized (and it is therefore safe to poke). |
| 223 bool is_webkit_initialized_; | 220 bool is_webkit_initialized_; |
| 224 | 221 |
| 225 std::string test_extension_id_; | |
| 226 | |
| 227 // Status of webrequest usage for known extensions. | 222 // Status of webrequest usage for known extensions. |
| 228 // TODO(mpcomplete): remove. http://crbug.com/100411 | 223 // TODO(mpcomplete): remove. http://crbug.com/100411 |
| 229 bool webrequest_adblock_; | 224 bool webrequest_adblock_; |
| 230 bool webrequest_adblock_plus_; | 225 bool webrequest_adblock_plus_; |
| 231 bool webrequest_other_; | 226 bool webrequest_other_; |
| 232 | 227 |
| 233 ResourceBundleSourceMap source_map_; | 228 ResourceBundleSourceMap source_map_; |
| 234 | 229 |
| 235 // Cache for the v8 representation of extension API schemas. | 230 // Cache for the v8 representation of extension API schemas. |
| 236 extensions::V8SchemaRegistry v8_schema_registry_; | 231 extensions::V8SchemaRegistry v8_schema_registry_; |
| 237 | 232 |
| 238 // Bindings that are defined lazily and have BindingInstallers to install | 233 // Bindings that are defined lazily and have BindingInstallers to install |
| 239 // them. | 234 // them. |
| 240 std::map<std::string, BindingInstaller> lazy_bindings_map_; | 235 std::map<std::string, BindingInstaller> lazy_bindings_map_; |
| 241 | 236 |
| 242 // Sends API requests to the extension host. | 237 // Sends API requests to the extension host. |
| 243 scoped_ptr<ExtensionRequestSender> request_sender_; | 238 scoped_ptr<ExtensionRequestSender> request_sender_; |
| 244 | 239 |
| 245 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); | 240 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); |
| 246 }; | 241 }; |
| 247 | 242 |
| 248 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 243 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| OLD | NEW |