Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: extensions/renderer/dispatcher.h

Issue 2940893002: [Extensions] Pass EventFilteringInfo directly in DispatchEvent message (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/renderer/api_event_listeners_unittest.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 namespace base { 51 namespace base {
52 class ListValue; 52 class ListValue;
53 } 53 }
54 54
55 namespace extensions { 55 namespace extensions {
56 class ContentWatcher; 56 class ContentWatcher;
57 class DispatcherDelegate; 57 class DispatcherDelegate;
58 class ExtensionBindingsSystem; 58 class ExtensionBindingsSystem;
59 class ScriptContext; 59 class ScriptContext;
60 class ScriptInjectionManager; 60 class ScriptInjectionManager;
61 struct EventFilteringInfo;
61 struct Message; 62 struct Message;
62 struct PortId; 63 struct PortId;
63 64
64 // Dispatches extension control messages sent to the renderer and stores 65 // Dispatches extension control messages sent to the renderer and stores
65 // renderer extension related state. 66 // renderer extension related state.
66 class Dispatcher : public content::RenderThreadObserver, 67 class Dispatcher : public content::RenderThreadObserver,
67 public UserScriptSetManager::Observer { 68 public UserScriptSetManager::Observer {
68 public: 69 public:
69 explicit Dispatcher(DispatcherDelegate* delegate); 70 explicit Dispatcher(DispatcherDelegate* delegate);
70 ~Dispatcher() override; 71 ~Dispatcher() override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 void OnExtensionResponse(int request_id, 119 void OnExtensionResponse(int request_id,
119 bool success, 120 bool success,
120 const base::ListValue& response, 121 const base::ListValue& response,
121 const std::string& error); 122 const std::string& error);
122 123
123 // Dispatches the event named |event_name| to all render views. 124 // Dispatches the event named |event_name| to all render views.
124 void DispatchEvent(const std::string& extension_id, 125 void DispatchEvent(const std::string& extension_id,
125 const std::string& event_name, 126 const std::string& event_name,
126 const base::ListValue& event_args, 127 const base::ListValue& event_args,
127 const base::DictionaryValue& filtering_info) const; 128 const EventFilteringInfo& filtering_info) const;
128 129
129 // Shared implementation of the various MessageInvoke IPCs. 130 // Shared implementation of the various MessageInvoke IPCs.
130 void InvokeModuleSystemMethod(content::RenderFrame* render_frame, 131 void InvokeModuleSystemMethod(content::RenderFrame* render_frame,
131 const std::string& extension_id, 132 const std::string& extension_id,
132 const std::string& module_name, 133 const std::string& module_name,
133 const std::string& function_name, 134 const std::string& function_name,
134 const base::ListValue& args); 135 const base::ListValue& args);
135 136
136 // Returns a list of (module name, resource id) pairs for the JS modules to 137 // Returns a list of (module name, resource id) pairs for the JS modules to
137 // add to the source map. 138 // add to the source map.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // if this renderer is a WebView guest render process. Otherwise, this will be 296 // if this renderer is a WebView guest render process. Otherwise, this will be
296 // empty. 297 // empty.
297 std::string webview_partition_id_; 298 std::string webview_partition_id_;
298 299
299 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 300 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
300 }; 301 };
301 302
302 } // namespace extensions 303 } // namespace extensions
303 304
304 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 305 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « extensions/renderer/api_event_listeners_unittest.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698