OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // the extension process to correspond to the given filter and | 238 // the extension process to correspond to the given filter and |
239 // extra_info_spec. It returns true on success, false on failure. | 239 // extra_info_spec. It returns true on success, false on failure. |
240 bool AddEventListener( | 240 bool AddEventListener( |
241 void* profile, | 241 void* profile, |
242 const std::string& extension_id, | 242 const std::string& extension_id, |
243 const std::string& extension_name, | 243 const std::string& extension_name, |
244 const std::string& event_name, | 244 const std::string& event_name, |
245 const std::string& sub_event_name, | 245 const std::string& sub_event_name, |
246 const RequestFilter& filter, | 246 const RequestFilter& filter, |
247 int extra_info_spec, | 247 int extra_info_spec, |
248 int target_process_id, | 248 int caller_process_id, |
249 int target_route_id, | 249 int caller_routing_id, |
| 250 int web_view_instance_id, |
250 base::WeakPtr<IPC::Sender> ipc_sender); | 251 base::WeakPtr<IPC::Sender> ipc_sender); |
251 | 252 |
252 // Removes the listener for the given sub-event. | 253 // Removes the listener for the given sub-event. |
253 void RemoveEventListener( | 254 void RemoveEventListener( |
254 void* profile, | 255 void* profile, |
255 const std::string& extension_id, | 256 const std::string& extension_id, |
256 const std::string& sub_event_name); | 257 const std::string& sub_event_name); |
257 | 258 |
| 259 // Removes the listeners for a given <webview>. |
| 260 void RemoveWebViewEventListeners( |
| 261 void* profile, |
| 262 const std::string& extension_id, |
| 263 int embedder_process_id, |
| 264 int embedder_routing_id, |
| 265 int web_view_instance_id); |
| 266 |
258 // Called when an incognito profile is created or destroyed. | 267 // Called when an incognito profile is created or destroyed. |
259 void OnOTRProfileCreated(void* original_profile, | 268 void OnOTRProfileCreated(void* original_profile, |
260 void* otr_profile); | 269 void* otr_profile); |
261 void OnOTRProfileDestroyed(void* original_profile, | 270 void OnOTRProfileDestroyed(void* original_profile, |
262 void* otr_profile); | 271 void* otr_profile); |
263 | 272 |
264 // Registers a |callback| that is executed when the next page load happens. | 273 // Registers a |callback| that is executed when the next page load happens. |
265 // The callback is then deleted. | 274 // The callback is then deleted. |
266 void AddCallbackForPageLoad(const base::Closure& callback); | 275 void AddCallbackForPageLoad(const base::Closure& callback); |
267 | 276 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; | 465 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; |
457 virtual bool RunImpl() OVERRIDE; | 466 virtual bool RunImpl() OVERRIDE; |
458 }; | 467 }; |
459 | 468 |
460 // Send updates to |host| with information about what webRequest-related | 469 // Send updates to |host| with information about what webRequest-related |
461 // extensions are installed. | 470 // extensions are installed. |
462 // TODO(mpcomplete): remove. http://crbug.com/100411 | 471 // TODO(mpcomplete): remove. http://crbug.com/100411 |
463 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); | 472 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); |
464 | 473 |
465 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 474 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
OLD | NEW |