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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 class Dispatcher : public content::RenderProcessObserver, | 65 class Dispatcher : public content::RenderProcessObserver, |
66 public UserScriptSetManager::Observer { | 66 public UserScriptSetManager::Observer { |
67 public: | 67 public: |
68 explicit Dispatcher(DispatcherDelegate* delegate); | 68 explicit Dispatcher(DispatcherDelegate* delegate); |
69 ~Dispatcher() override; | 69 ~Dispatcher() override; |
70 | 70 |
71 const std::set<std::string>& function_names() const { | 71 const std::set<std::string>& function_names() const { |
72 return function_names_; | 72 return function_names_; |
73 } | 73 } |
74 | 74 |
75 bool is_extension_process() const { return is_extension_process_; } | |
76 | |
77 const ExtensionSet* extensions() const { return &extensions_; } | 75 const ExtensionSet* extensions() const { return &extensions_; } |
78 | 76 |
79 const ScriptContextSet& script_context_set() const { | 77 const ScriptContextSet& script_context_set() const { |
80 return script_context_set_; | 78 return script_context_set_; |
81 } | 79 } |
82 | 80 |
83 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } | 81 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } |
84 | 82 |
85 ContentWatcher* content_watcher() { return content_watcher_.get(); } | 83 ContentWatcher* content_watcher() { return content_watcher_.get(); } |
86 | 84 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 258 |
261 v8::Handle<v8::Object> GetOrCreateBindObjectIfAvailable( | 259 v8::Handle<v8::Object> GetOrCreateBindObjectIfAvailable( |
262 const std::string& api_name, | 260 const std::string& api_name, |
263 std::string* bind_name, | 261 std::string* bind_name, |
264 ScriptContext* context); | 262 ScriptContext* context); |
265 | 263 |
266 // The delegate for this dispatcher. Not owned, but must extend beyond the | 264 // The delegate for this dispatcher. Not owned, but must extend beyond the |
267 // Dispatcher's own lifetime. | 265 // Dispatcher's own lifetime. |
268 DispatcherDelegate* delegate_; | 266 DispatcherDelegate* delegate_; |
269 | 267 |
270 // True if this renderer is running extensions. | 268 // True if the IdleNotification timer should be set. |
271 bool is_extension_process_; | 269 bool set_idle_notifications_; |
272 | 270 |
273 // Contains all loaded extensions. This is essentially the renderer | 271 // Contains all loaded extensions. This is essentially the renderer |
274 // counterpart to ExtensionService in the browser. It contains information | 272 // counterpart to ExtensionService in the browser. It contains information |
275 // about all extensions currently loaded by the browser. | 273 // about all extensions currently loaded by the browser. |
276 ExtensionSet extensions_; | 274 ExtensionSet extensions_; |
277 | 275 |
278 // The IDs of extensions that failed to load, mapped to the error message | 276 // The IDs of extensions that failed to load, mapped to the error message |
279 // generated on failure. | 277 // generated on failure. |
280 std::map<std::string, std::string> extension_load_errors_; | 278 std::map<std::string, std::string> extension_load_errors_; |
281 | 279 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 322 |
325 // Status of webrequest usage. | 323 // Status of webrequest usage. |
326 bool webrequest_used_; | 324 bool webrequest_used_; |
327 | 325 |
328 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 326 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
329 }; | 327 }; |
330 | 328 |
331 } // namespace extensions | 329 } // namespace extensions |
332 | 330 |
333 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 331 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |