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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } | 83 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } |
84 | 84 |
85 ContentWatcher* content_watcher() { return content_watcher_.get(); } | 85 ContentWatcher* content_watcher() { return content_watcher_.get(); } |
86 | 86 |
87 RequestSender* request_sender() { return request_sender_.get(); } | 87 RequestSender* request_sender() { return request_sender_.get(); } |
88 | 88 |
89 void OnRenderViewCreated(content::RenderView* render_view); | 89 void OnRenderViewCreated(content::RenderView* render_view); |
90 | 90 |
91 bool IsExtensionActive(const std::string& extension_id) const; | 91 bool IsExtensionActive(const std::string& extension_id) const; |
92 | 92 |
93 // Finds the extension ID for the JavaScript context associated with the | 93 // Finds the extension for the JavaScript context associated with the |
94 // specified |frame| and isolated world. If |world_id| is zero, finds the | 94 // specified |frame| and isolated world. If |world_id| is zero, finds the |
95 // extension ID associated with the main world's JavaScript context. If the | 95 // extension ID associated with the main world's JavaScript context. If the |
96 // JavaScript context isn't from an extension, returns empty string. | 96 // JavaScript context isn't from an extension, returns empty string. |
97 std::string GetExtensionID(const blink::WebFrame* frame, int world_id); | 97 const Extension* GetExtensionFromFrameAndWorld(const blink::WebFrame* frame, |
| 98 int world_id, |
| 99 bool use_effective_url); |
98 | 100 |
99 void DidCreateScriptContext(blink::WebFrame* frame, | 101 void DidCreateScriptContext(blink::WebFrame* frame, |
100 const v8::Handle<v8::Context>& context, | 102 const v8::Handle<v8::Context>& context, |
101 int extension_group, | 103 int extension_group, |
102 int world_id); | 104 int world_id); |
103 | 105 |
104 void WillReleaseScriptContext(blink::WebFrame* frame, | 106 void WillReleaseScriptContext(blink::WebFrame* frame, |
105 const v8::Handle<v8::Context>& context, | 107 const v8::Handle<v8::Context>& context, |
106 int world_id); | 108 int world_id); |
107 | 109 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // the observer is destroyed before the UserScriptSet. | 310 // the observer is destroyed before the UserScriptSet. |
309 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 311 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
310 user_script_set_manager_observer_; | 312 user_script_set_manager_observer_; |
311 | 313 |
312 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 314 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
313 }; | 315 }; |
314 | 316 |
315 } // namespace extensions | 317 } // namespace extensions |
316 | 318 |
317 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 319 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |