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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 struct Message; | 63 struct Message; |
64 | 64 |
65 // Dispatches extension control messages sent to the renderer and stores | 65 // Dispatches extension control messages sent to the renderer and stores |
66 // renderer extension related state. | 66 // renderer extension related state. |
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 // Returns the single instance of the dispatcher. | |
74 static Dispatcher* Get(); | |
not at google - send to devlin
2015/06/19 23:14:58
Can you avoid adding this if you pass the RenderFr
Devlin
2015/06/22 19:52:33
Done.
| |
75 | |
73 const std::set<std::string>& function_names() const { | 76 const std::set<std::string>& function_names() const { |
74 return function_names_; | 77 return function_names_; |
75 } | 78 } |
76 | 79 |
77 const ExtensionSet* extensions() const { return &extensions_; } | 80 const ExtensionSet* extensions() const { return &extensions_; } |
78 | 81 |
79 const ScriptContextSet& script_context_set() const { | 82 const ScriptContextSet& script_context_set() const { |
80 return *script_context_set_; | 83 return *script_context_set_; |
81 } | 84 } |
82 | 85 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 315 |
313 // Status of webrequest usage. | 316 // Status of webrequest usage. |
314 bool webrequest_used_; | 317 bool webrequest_used_; |
315 | 318 |
316 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 319 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
317 }; | 320 }; |
318 | 321 |
319 } // namespace extensions | 322 } // namespace extensions |
320 | 323 |
321 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 324 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |