| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class Dispatcher : public content::RenderProcessObserver, | 67 class Dispatcher : public content::RenderProcessObserver, |
| 68 public UserScriptSetManager::Observer { | 68 public UserScriptSetManager::Observer { |
| 69 public: | 69 public: |
| 70 explicit Dispatcher(DispatcherDelegate* delegate); | 70 explicit Dispatcher(DispatcherDelegate* delegate); |
| 71 ~Dispatcher() override; | 71 ~Dispatcher() override; |
| 72 | 72 |
| 73 const std::set<std::string>& function_names() const { | 73 const std::set<std::string>& function_names() const { |
| 74 return function_names_; | 74 return function_names_; |
| 75 } | 75 } |
| 76 | 76 |
| 77 const ExtensionSet* extensions() const { return &extensions_; } | 77 const ExtensionSet* extensions() const; |
| 78 | 78 |
| 79 const ScriptContextSet& script_context_set() const { | 79 const ScriptContextSet& script_context_set() const { |
| 80 return *script_context_set_; | 80 return *script_context_set_; |
| 81 } | 81 } |
| 82 | 82 |
| 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(); } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // Adds features that are specific to the current channel. | 249 // Adds features that are specific to the current channel. |
| 250 void AddChannelSpecificFeatures(); | 250 void AddChannelSpecificFeatures(); |
| 251 | 251 |
| 252 // The delegate for this dispatcher. Not owned, but must extend beyond the | 252 // The delegate for this dispatcher. Not owned, but must extend beyond the |
| 253 // Dispatcher's own lifetime. | 253 // Dispatcher's own lifetime. |
| 254 DispatcherDelegate* delegate_; | 254 DispatcherDelegate* delegate_; |
| 255 | 255 |
| 256 // True if the IdleNotification timer should be set. | 256 // True if the IdleNotification timer should be set. |
| 257 bool set_idle_notifications_; | 257 bool set_idle_notifications_; |
| 258 | 258 |
| 259 // Contains all loaded extensions. This is essentially the renderer | |
| 260 // counterpart to ExtensionService in the browser. It contains information | |
| 261 // about all extensions currently loaded by the browser. | |
| 262 ExtensionSet extensions_; | |
| 263 | |
| 264 // The IDs of extensions that failed to load, mapped to the error message | 259 // The IDs of extensions that failed to load, mapped to the error message |
| 265 // generated on failure. | 260 // generated on failure. |
| 266 std::map<std::string, std::string> extension_load_errors_; | 261 std::map<std::string, std::string> extension_load_errors_; |
| 267 | 262 |
| 268 // All the bindings contexts that are currently loaded for this renderer. | 263 // All the bindings contexts that are currently loaded for this renderer. |
| 269 // There is zero or one for each v8 context. | 264 // There is zero or one for each v8 context. |
| 270 scoped_ptr<ScriptContextSet> script_context_set_; | 265 scoped_ptr<ScriptContextSet> script_context_set_; |
| 271 | 266 |
| 272 scoped_ptr<ContentWatcher> content_watcher_; | 267 scoped_ptr<ContentWatcher> content_watcher_; |
| 273 | 268 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 305 |
| 311 // Status of webrequest usage. | 306 // Status of webrequest usage. |
| 312 bool webrequest_used_; | 307 bool webrequest_used_; |
| 313 | 308 |
| 314 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 309 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 315 }; | 310 }; |
| 316 | 311 |
| 317 } // namespace extensions | 312 } // namespace extensions |
| 318 | 313 |
| 319 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 314 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |