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

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

Issue 12226022: <webview>: Store <webview> embedder info in ExtensionRendererState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated comment on instance ID Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_renderer_state.h » ('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 (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 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 int tab_id, 1267 int tab_id,
1268 int window_id, 1268 int window_id,
1269 int render_process_host_id, 1269 int render_process_host_id,
1270 int routing_id, 1270 int routing_id,
1271 ResourceType::Type resource_type, 1271 ResourceType::Type resource_type,
1272 bool is_async_request, 1272 bool is_async_request,
1273 bool is_request_from_extension, 1273 bool is_request_from_extension,
1274 int* extra_info_spec, 1274 int* extra_info_spec,
1275 std::vector<const ExtensionWebRequestEventRouter::EventListener*>* 1275 std::vector<const ExtensionWebRequestEventRouter::EventListener*>*
1276 matching_listeners) { 1276 matching_listeners) {
1277 ExtensionRendererState::WebViewInfo web_view_info;
1277 bool is_guest = ExtensionRendererState::GetInstance()-> 1278 bool is_guest = ExtensionRendererState::GetInstance()->
1278 IsGuestProcess(render_process_host_id); 1279 GetWebViewInfo(render_process_host_id, routing_id, &web_view_info);
1279 std::set<EventListener>& listeners = listeners_[profile][event_name]; 1280 std::set<EventListener>& listeners = listeners_[profile][event_name];
1280 for (std::set<EventListener>::iterator it = listeners.begin(); 1281 for (std::set<EventListener>::iterator it = listeners.begin();
1281 it != listeners.end(); ++it) { 1282 it != listeners.end(); ++it) {
1282 if (!it->ipc_sender.get()) { 1283 if (!it->ipc_sender.get()) {
1283 // The IPC sender has been deleted. This listener will be removed soon 1284 // The IPC sender has been deleted. This listener will be removed soon
1284 // via a call to RemoveEventListener. For now, just skip it. 1285 // via a call to RemoveEventListener. For now, just skip it.
1285 continue; 1286 continue;
1286 } 1287 }
1287 1288
1288 if (is_guest && (it->target_process_id != render_process_host_id|| 1289 if (is_guest && (it->target_process_id != render_process_host_id||
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 } else if ((*it)->name().find("AdBlock") != std::string::npos) { 2030 } else if ((*it)->name().find("AdBlock") != std::string::npos) {
2030 adblock = true; 2031 adblock = true;
2031 } else { 2032 } else {
2032 other = true; 2033 other = true;
2033 } 2034 }
2034 } 2035 }
2035 } 2036 }
2036 2037
2037 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); 2038 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other));
2038 } 2039 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_renderer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698