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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 CannotScriptWebstore); | 156 CannotScriptWebstore); |
157 | 157 |
158 // RenderProcessObserver implementation: | 158 // RenderProcessObserver implementation: |
159 bool OnControlMessageReceived(const IPC::Message& message) override; | 159 bool OnControlMessageReceived(const IPC::Message& message) override; |
160 void WebKitInitialized() override; | 160 void WebKitInitialized() override; |
161 void IdleNotification() override; | 161 void IdleNotification() override; |
162 void OnRenderProcessShutdown() override; | 162 void OnRenderProcessShutdown() override; |
163 | 163 |
164 void OnActivateExtension(const std::string& extension_id); | 164 void OnActivateExtension(const std::string& extension_id); |
165 void OnCancelSuspend(const std::string& extension_id); | 165 void OnCancelSuspend(const std::string& extension_id); |
166 void OnClearTabSpecificPermissions( | |
167 int tab_id, | |
168 const std::vector<std::string>& extension_ids); | |
169 void OnDeliverMessage(int target_port_id, const Message& message); | 166 void OnDeliverMessage(int target_port_id, const Message& message); |
170 void OnDispatchOnConnect(int target_port_id, | 167 void OnDispatchOnConnect(int target_port_id, |
171 const std::string& channel_name, | 168 const std::string& channel_name, |
172 const base::DictionaryValue& source_tab, | 169 const base::DictionaryValue& source_tab, |
173 const ExtensionMsg_ExternalConnectionInfo& info, | 170 const ExtensionMsg_ExternalConnectionInfo& info, |
174 const std::string& tls_channel_id); | 171 const std::string& tls_channel_id); |
175 void OnDispatchOnDisconnect(int port_id, const std::string& error_message); | 172 void OnDispatchOnDisconnect(int port_id, const std::string& error_message); |
176 void OnLoaded( | 173 void OnLoaded( |
177 const std::vector<ExtensionMsg_Loaded_Params>& loaded_extensions); | 174 const std::vector<ExtensionMsg_Loaded_Params>& loaded_extensions); |
178 void OnLoadedInternal(scoped_refptr<const Extension> extension); | 175 void OnLoadedInternal(scoped_refptr<const Extension> extension); |
179 void OnMessageInvoke(const std::string& extension_id, | 176 void OnMessageInvoke(const std::string& extension_id, |
180 const std::string& module_name, | 177 const std::string& module_name, |
181 const std::string& function_name, | 178 const std::string& function_name, |
182 const base::ListValue& args, | 179 const base::ListValue& args, |
183 bool user_gesture); | 180 bool user_gesture); |
184 void OnSetChannel(int channel); | 181 void OnSetChannel(int channel); |
185 void OnSetFunctionNames(const std::vector<std::string>& names); | 182 void OnSetFunctionNames(const std::vector<std::string>& names); |
186 void OnSetScriptingWhitelist( | 183 void OnSetScriptingWhitelist( |
187 const ExtensionsClient::ScriptingWhitelist& extension_ids); | 184 const ExtensionsClient::ScriptingWhitelist& extension_ids); |
188 void OnSetSystemFont(const std::string& font_family, | 185 void OnSetSystemFont(const std::string& font_family, |
189 const std::string& font_size); | 186 const std::string& font_size); |
190 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id); | 187 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id); |
191 void OnSuspend(const std::string& extension_id); | 188 void OnSuspend(const std::string& extension_id); |
192 void OnTransferBlobs(const std::vector<std::string>& blob_uuids); | 189 void OnTransferBlobs(const std::vector<std::string>& blob_uuids); |
193 void OnUnloaded(const std::string& id); | 190 void OnUnloaded(const std::string& id); |
194 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params); | 191 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params); |
195 void OnUpdateTabSpecificPermissions(const GURL& url, | |
196 int tab_id, | |
197 const std::string& extension_id, | |
198 const URLPatternSet& origin_set); | |
199 void OnUsingWebRequestAPI(bool webrequest_used); | 192 void OnUsingWebRequestAPI(bool webrequest_used); |
200 | 193 |
201 // UserScriptSetManager::Observer implementation. | 194 // UserScriptSetManager::Observer implementation. |
202 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, | 195 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, |
203 const std::vector<UserScript*>& scripts) override; | 196 const std::vector<UserScript*>& scripts) override; |
204 | 197 |
205 void UpdateActiveExtensions(); | 198 void UpdateActiveExtensions(); |
206 | 199 |
207 // Sets up the host permissions for |extension|. | 200 // Sets up the host permissions for |extension|. |
208 void InitOriginPermissions(const Extension* extension); | 201 void InitOriginPermissions(const Extension* extension); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 307 |
315 // Status of webrequest usage. | 308 // Status of webrequest usage. |
316 bool webrequest_used_; | 309 bool webrequest_used_; |
317 | 310 |
318 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 311 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
319 }; | 312 }; |
320 | 313 |
321 } // namespace extensions | 314 } // namespace extensions |
322 | 315 |
323 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 316 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |