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

Side by Side Diff: extensions/browser/guest_view/guest_view_manager.cc

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: some review comments addressed 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 "extensions/browser/guest_view/guest_view_manager.h" 5 #include "extensions/browser/guest_view/guest_view_manager.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 content::WebContents* GuestViewManager::GetGuestByInstanceIDSafely( 64 content::WebContents* GuestViewManager::GetGuestByInstanceIDSafely(
65 int guest_instance_id, 65 int guest_instance_id,
66 int embedder_render_process_id) { 66 int embedder_render_process_id) {
67 if (!CanEmbedderAccessInstanceIDMaybeKill(embedder_render_process_id, 67 if (!CanEmbedderAccessInstanceIDMaybeKill(embedder_render_process_id,
68 guest_instance_id)) { 68 guest_instance_id)) {
69 return nullptr; 69 return nullptr;
70 } 70 }
71 return GetGuestByInstanceID(guest_instance_id); 71 return GetGuestByInstanceID(guest_instance_id);
72 } 72 }
73 73
74 content::WebContents* GuestViewManager::GetGuestByInstanceIDHack(
75 int guest_instance_id) {
76 return GetGuestByInstanceID(guest_instance_id);
77 }
78
74 void GuestViewManager::AttachGuest(int embedder_process_id, 79 void GuestViewManager::AttachGuest(int embedder_process_id,
75 int element_instance_id, 80 int element_instance_id,
76 int guest_instance_id, 81 int guest_instance_id,
77 const base::DictionaryValue& attach_params) { 82 const base::DictionaryValue& attach_params) {
78 auto guest_view = GuestViewBase::From(embedder_process_id, guest_instance_id); 83 auto guest_view = GuestViewBase::From(embedder_process_id, guest_instance_id);
79 if (!guest_view) 84 if (!guest_view)
80 return; 85 return;
81 86
82 ElementInstanceKey key(embedder_process_id, element_instance_id); 87 ElementInstanceKey key(embedder_process_id, element_instance_id);
83 auto it = instance_id_map_.find(key); 88 auto it = instance_id_map_.find(key);
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return element_instance_id < other.element_instance_id; 312 return element_instance_id < other.element_instance_id;
308 } 313 }
309 314
310 bool GuestViewManager::ElementInstanceKey::operator==( 315 bool GuestViewManager::ElementInstanceKey::operator==(
311 const GuestViewManager::ElementInstanceKey& other) const { 316 const GuestViewManager::ElementInstanceKey& other) const {
312 return (embedder_process_id == other.embedder_process_id) && 317 return (embedder_process_id == other.embedder_process_id) &&
313 (element_instance_id == other.element_instance_id); 318 (element_instance_id == other.element_instance_id);
314 } 319 }
315 320
316 } // namespace extensions 321 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698