| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_RENDERER_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } | 80 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } |
| 81 | 81 |
| 82 ContentWatcher* content_watcher() { return content_watcher_.get(); } | 82 ContentWatcher* content_watcher() { return content_watcher_.get(); } |
| 83 | 83 |
| 84 RequestSender* request_sender() { return request_sender_.get(); } | 84 RequestSender* request_sender() { return request_sender_.get(); } |
| 85 | 85 |
| 86 const std::string& webview_partition_id() { return webview_partition_id_; } | 86 const std::string& webview_partition_id() { return webview_partition_id_; } |
| 87 | 87 |
| 88 bool activity_logging_enabled() const { return activity_logging_enabled_; } |
| 89 |
| 88 void OnRenderFrameCreated(content::RenderFrame* render_frame); | 90 void OnRenderFrameCreated(content::RenderFrame* render_frame); |
| 89 | 91 |
| 90 bool IsExtensionActive(const std::string& extension_id) const; | 92 bool IsExtensionActive(const std::string& extension_id) const; |
| 91 | 93 |
| 92 void DidCreateScriptContext(blink::WebLocalFrame* frame, | 94 void DidCreateScriptContext(blink::WebLocalFrame* frame, |
| 93 const v8::Local<v8::Context>& context, | 95 const v8::Local<v8::Context>& context, |
| 94 int extension_group, | 96 int extension_group, |
| 95 int world_id); | 97 int world_id); |
| 96 | 98 |
| 97 // Runs on a different thread and should only use thread safe member | 99 // Runs on a different thread and should only use thread safe member |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 void OnUpdateTabSpecificPermissions(const GURL& visible_url, | 193 void OnUpdateTabSpecificPermissions(const GURL& visible_url, |
| 192 const std::string& extension_id, | 194 const std::string& extension_id, |
| 193 const URLPatternSet& new_hosts, | 195 const URLPatternSet& new_hosts, |
| 194 bool update_origin_whitelist, | 196 bool update_origin_whitelist, |
| 195 int tab_id); | 197 int tab_id); |
| 196 void OnClearTabSpecificPermissions( | 198 void OnClearTabSpecificPermissions( |
| 197 const std::vector<std::string>& extension_ids, | 199 const std::vector<std::string>& extension_ids, |
| 198 bool update_origin_whitelist, | 200 bool update_origin_whitelist, |
| 199 int tab_id); | 201 int tab_id); |
| 200 void OnUsingWebRequestAPI(bool webrequest_used); | 202 void OnUsingWebRequestAPI(bool webrequest_used); |
| 203 void OnSetActivityLoggingEnabled(bool enabled); |
| 201 | 204 |
| 202 // UserScriptSetManager::Observer implementation. | 205 // UserScriptSetManager::Observer implementation. |
| 203 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, | 206 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, |
| 204 const std::vector<UserScript*>& scripts) override; | 207 const std::vector<UserScript*>& scripts) override; |
| 205 | 208 |
| 206 void UpdateActiveExtensions(); | 209 void UpdateActiveExtensions(); |
| 207 | 210 |
| 208 // Sets up the host permissions for |extension|. | 211 // Sets up the host permissions for |extension|. |
| 209 void InitOriginPermissions(const Extension* extension); | 212 void InitOriginPermissions(const Extension* extension); |
| 210 | 213 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 std::string system_font_size_; | 304 std::string system_font_size_; |
| 302 | 305 |
| 303 // It is important for this to come after the ScriptInjectionManager, so that | 306 // It is important for this to come after the ScriptInjectionManager, so that |
| 304 // the observer is destroyed before the UserScriptSet. | 307 // the observer is destroyed before the UserScriptSet. |
| 305 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 308 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
| 306 user_script_set_manager_observer_; | 309 user_script_set_manager_observer_; |
| 307 | 310 |
| 308 // Status of webrequest usage. | 311 // Status of webrequest usage. |
| 309 bool webrequest_used_; | 312 bool webrequest_used_; |
| 310 | 313 |
| 314 // Whether or not extension activity is enabled. |
| 315 bool activity_logging_enabled_; |
| 316 |
| 311 // The WebView partition ID associated with this process's storage partition, | 317 // The WebView partition ID associated with this process's storage partition, |
| 312 // if this renderer is a WebView guest render process. Otherwise, this will be | 318 // if this renderer is a WebView guest render process. Otherwise, this will be |
| 313 // empty. | 319 // empty. |
| 314 std::string webview_partition_id_; | 320 std::string webview_partition_id_; |
| 315 | 321 |
| 316 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 322 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 317 }; | 323 }; |
| 318 | 324 |
| 319 } // namespace extensions | 325 } // namespace extensions |
| 320 | 326 |
| 321 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 327 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |