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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api.h

Issue 23514016: <webview>: Cleanup WebRequest event listeners when embedder destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 7 years, 3 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
OLDNEW
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 embedder_process_id, 248 int embedder_process_id,
249 int embedder_routing_id,
250 int web_view_instance_id, 249 int web_view_instance_id,
251 base::WeakPtr<IPC::Sender> ipc_sender); 250 base::WeakPtr<IPC::Sender> ipc_sender);
252 251
253 // Removes the listener for the given sub-event. 252 // Removes the listener for the given sub-event.
254 void RemoveEventListener( 253 void RemoveEventListener(
255 void* profile, 254 void* profile,
256 const std::string& extension_id, 255 const std::string& extension_id,
257 const std::string& sub_event_name); 256 const std::string& sub_event_name);
258 257
259 // Removes the listeners for a given <webview>. 258 // Removes the listeners for a given <webview>.
260 void RemoveWebViewEventListeners( 259 void RemoveWebViewEventListeners(
261 void* profile, 260 void* profile,
262 const std::string& extension_id, 261 const std::string& extension_id,
263 int embedder_process_id, 262 int embedder_process_id,
264 int embedder_routing_id,
265 int web_view_instance_id); 263 int web_view_instance_id);
266 264
267 // Called when an incognito profile is created or destroyed. 265 // Called when an incognito profile is created or destroyed.
268 void OnOTRProfileCreated(void* original_profile, 266 void OnOTRProfileCreated(void* original_profile,
269 void* otr_profile); 267 void* otr_profile);
270 void OnOTRProfileDestroyed(void* original_profile, 268 void OnOTRProfileDestroyed(void* original_profile,
271 void* otr_profile); 269 void* otr_profile);
272 270
273 // Registers a |callback| that is executed when the next page load happens. 271 // Registers a |callback| that is executed when the next page load happens.
274 // The callback is then deleted. 272 // The callback is then deleted.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; 470 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE;
473 virtual bool RunImpl() OVERRIDE; 471 virtual bool RunImpl() OVERRIDE;
474 }; 472 };
475 473
476 // Send updates to |host| with information about what webRequest-related 474 // Send updates to |host| with information about what webRequest-related
477 // extensions are installed. 475 // extensions are installed.
478 // TODO(mpcomplete): remove. http://crbug.com/100411 476 // TODO(mpcomplete): remove. http://crbug.com/100411
479 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); 477 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host);
480 478
481 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ 479 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698