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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 23530029: Support webview tag when the container extension is embedded in a webUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary lines from document_custom_bindings 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 | Annotate | Revision Log
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 "content/browser/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 691
692 // Use this as our new pending RVH if it isn't swapped out. 692 // Use this as our new pending RVH if it isn't swapped out.
693 if (!swapped_out) 693 if (!swapped_out)
694 pending_render_view_host_ = new_render_view_host; 694 pending_render_view_host_ = new_render_view_host;
695 695
696 return new_render_view_host->GetRoutingID(); 696 return new_render_view_host->GetRoutingID();
697 } 697 }
698 698
699 bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host, 699 bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host,
700 int opener_route_id) { 700 int opener_route_id) {
701 // If the pending navigation is to a WebUI, tell the RenderView about any 701 // If the pending navigation is to a WebUI and the RenderView is not in a
702 // bindings it will need enabled. 702 // guest process, tell the RenderView about any bindings it will need enabled.
703 if (pending_web_ui()) 703 if (pending_web_ui() && !render_view_host->GetProcess()->IsGuest())
Charlie Reis 2013/09/13 21:17:24 Is this independent of the rest of the CL? Maybe
guohui 2013/09/16 22:27:02 yes it is, though without other changes in this CL
Charlie Reis 2013/09/18 17:42:23 It's still a useful defense-in-depth check, so I t
guohui 2013/09/19 13:48:41 Done.
704 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); 704 render_view_host->AllowBindings(pending_web_ui()->GetBindings());
705 705
706 return delegate_->CreateRenderViewForRenderManager(render_view_host, 706 return delegate_->CreateRenderViewForRenderManager(render_view_host,
707 opener_route_id); 707 opener_route_id);
708 } 708 }
709 709
710 void RenderViewHostManager::CommitPending() { 710 void RenderViewHostManager::CommitPending() {
711 // First check whether we're going to want to focus the location bar after 711 // First check whether we're going to want to focus the location bar after
712 // this commit. We do this now because the navigation hasn't formally 712 // this commit. We do this now because the navigation hasn't formally
713 // committed yet, so if we've already cleared |pending_web_ui_| the call chain 713 // committed yet, so if we've already cleared |pending_web_ui_| the call chain
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 1045 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
1046 SiteInstance* instance) { 1046 SiteInstance* instance) {
1047 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 1047 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
1048 if (iter != swapped_out_hosts_.end()) 1048 if (iter != swapped_out_hosts_.end())
1049 return iter->second; 1049 return iter->second;
1050 1050
1051 return NULL; 1051 return NULL;
1052 } 1052 }
1053 1053
1054 } // namespace content 1054 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698