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_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 UserScriptSlave* user_script_slave() { | 64 UserScriptSlave* user_script_slave() { |
65 return user_script_slave_.get(); | 65 return user_script_slave_.get(); |
66 } | 66 } |
67 V8SchemaRegistry* v8_schema_registry() { | 67 V8SchemaRegistry* v8_schema_registry() { |
68 return &v8_schema_registry_; | 68 return &v8_schema_registry_; |
69 } | 69 } |
70 ContentWatcher* content_watcher() { | 70 ContentWatcher* content_watcher() { |
71 return content_watcher_.get(); | 71 return content_watcher_.get(); |
72 } | 72 } |
| 73 RequestSender* request_sender() { |
| 74 return request_sender_.get(); |
| 75 } |
73 | 76 |
74 bool IsExtensionActive(const std::string& extension_id) const; | 77 bool IsExtensionActive(const std::string& extension_id) const; |
75 | 78 |
76 // Finds the extension ID for the JavaScript context associated with the | 79 // Finds the extension ID for the JavaScript context associated with the |
77 // specified |frame| and isolated world. If |world_id| is zero, finds the | 80 // specified |frame| and isolated world. If |world_id| is zero, finds the |
78 // extension ID associated with the main world's JavaScript context. If the | 81 // extension ID associated with the main world's JavaScript context. If the |
79 // JavaScript context isn't from an extension, returns empty string. | 82 // JavaScript context isn't from an extension, returns empty string. |
80 std::string GetExtensionID(const WebKit::WebFrame* frame, int world_id); | 83 std::string GetExtensionID(const WebKit::WebFrame* frame, int world_id); |
81 | 84 |
82 // See WebKit::WebPermissionClient::allowScriptExtension | 85 // See WebKit::WebPermissionClient::allowScriptExtension |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 268 |
266 // Sends API requests to the extension host. | 269 // Sends API requests to the extension host. |
267 scoped_ptr<RequestSender> request_sender_; | 270 scoped_ptr<RequestSender> request_sender_; |
268 | 271 |
269 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 272 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
270 }; | 273 }; |
271 | 274 |
272 } // namespace extensions | 275 } // namespace extensions |
273 | 276 |
274 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 277 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
OLD | NEW |