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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_renderer_state.cc

Issue 1066563006: GuestView: Move GuestViewManager extension dependencies to ExtensionsGuestViewManagerDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extensions_guest_view_message_filter
Patch Set: Fixed more tests Created 5 years, 8 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 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 #include "content/public/browser/browser_thread.h" 5 #include "content/public/browser/browser_thread.h"
6 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" 6 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
7 7
8 using content::BrowserThread; 8 using content::BrowserThread;
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 auto iter = web_view_info_map_.find(render_id); 74 auto iter = web_view_info_map_.find(render_id);
75 if (iter != web_view_info_map_.end()) { 75 if (iter != web_view_info_map_.end()) {
76 *web_view_info = iter->second; 76 *web_view_info = iter->second;
77 return true; 77 return true;
78 } 78 }
79 return false; 79 return false;
80 } 80 }
81 81
82 bool WebViewRendererState::GetOwnerInfo(int guest_process_id, 82 bool WebViewRendererState::GetOwnerInfo(int guest_process_id,
83 int* owner_process_id, 83 int* owner_process_id,
84 std::string* owner_extension_id) const { 84 std::string* owner_host) const {
85 DCHECK_CURRENTLY_ON(BrowserThread::IO); 85 DCHECK_CURRENTLY_ON(BrowserThread::IO);
86 // TODO(fsamuel): Store per-process info in WebViewPartitionInfo instead of in 86 // TODO(fsamuel): Store per-process info in WebViewPartitionInfo instead of in
87 // WebViewInfo. 87 // WebViewInfo.
88 for (const auto& info : web_view_info_map_) { 88 for (const auto& info : web_view_info_map_) {
89 if (info.first.first == guest_process_id) { 89 if (info.first.first == guest_process_id) {
90 if (owner_process_id) 90 if (owner_process_id)
91 *owner_process_id = info.second.embedder_process_id; 91 *owner_process_id = info.second.embedder_process_id;
92 if (owner_extension_id) 92 if (owner_host)
93 *owner_extension_id = info.second.owner_extension_id; 93 *owner_host = info.second.owner_host;
94 return true; 94 return true;
95 } 95 }
96 } 96 }
97 return false; 97 return false;
98 } 98 }
99 99
100 bool WebViewRendererState::GetPartitionID(int guest_process_id, 100 bool WebViewRendererState::GetPartitionID(int guest_process_id,
101 std::string* partition_id) { 101 std::string* partition_id) {
102 DCHECK_CURRENTLY_ON(BrowserThread::IO); 102 DCHECK_CURRENTLY_ON(BrowserThread::IO);
103 103
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (info.embedder_process_id == embedder_process_id && 137 if (info.embedder_process_id == embedder_process_id &&
138 info.instance_id == view_instance_id) { 138 info.instance_id == view_instance_id) {
139 for (int id : script_ids) 139 for (int id : script_ids)
140 info.content_script_ids.erase(id); 140 info.content_script_ids.erase(id);
141 return; 141 return;
142 } 142 }
143 } 143 }
144 } 144 }
145 145
146 } // namespace extensions 146 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698