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

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

Issue 12330151: Merge 183730 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 9 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/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 } 3273 }
3274 3274
3275 int WebContentsImpl::CreateOpenerRenderViews(SiteInstance* instance) { 3275 int WebContentsImpl::CreateOpenerRenderViews(SiteInstance* instance) {
3276 int opener_route_id = MSG_ROUTING_NONE; 3276 int opener_route_id = MSG_ROUTING_NONE;
3277 3277
3278 // If this tab has an opener, ensure it has a RenderView in the given 3278 // If this tab has an opener, ensure it has a RenderView in the given
3279 // SiteInstance as well. 3279 // SiteInstance as well.
3280 if (opener_) 3280 if (opener_)
3281 opener_route_id = opener_->CreateOpenerRenderViews(instance); 3281 opener_route_id = opener_->CreateOpenerRenderViews(instance);
3282 3282
3283 // If any of the renderers for this WebContents has the same SiteInstance, 3283 // If any of the renderers (current, pending, or swapped out) for this
3284 // use it. 3284 // WebContents has the same SiteInstance, use it.
3285 if (render_manager_.current_host()->GetSiteInstance() == instance) 3285 if (render_manager_.current_host()->GetSiteInstance() == instance)
3286 return render_manager_.current_host()->GetRoutingID(); 3286 return render_manager_.current_host()->GetRoutingID();
3287 3287
3288 if (render_manager_.pending_render_view_host() &&
3289 render_manager_.pending_render_view_host()->GetSiteInstance() == instance)
3290 return render_manager_.pending_render_view_host()->GetRoutingID();
3291
3288 RenderViewHostImpl* rvh = render_manager_.GetSwappedOutRenderViewHost( 3292 RenderViewHostImpl* rvh = render_manager_.GetSwappedOutRenderViewHost(
3289 instance); 3293 instance);
3290 if (rvh) 3294 if (rvh)
3291 return rvh->GetRoutingID(); 3295 return rvh->GetRoutingID();
3292 3296
3293 // Create a swapped out RenderView in the given SiteInstance if none exists, 3297 // Create a swapped out RenderView in the given SiteInstance if none exists,
3294 // setting its opener to the given route_id. Return the new view's route_id. 3298 // setting its opener to the given route_id. Return the new view's route_id.
3295 return render_manager_.CreateRenderView(instance, opener_route_id, true); 3299 return render_manager_.CreateRenderView(instance, opener_route_id, true);
3296 } 3300 }
3297 3301
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3401 3405
3402 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3406 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3403 return browser_plugin_guest_.get(); 3407 return browser_plugin_guest_.get();
3404 } 3408 }
3405 3409
3406 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3410 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3407 return browser_plugin_embedder_.get(); 3411 return browser_plugin_embedder_.get();
3408 } 3412 }
3409 3413
3410 } // namespace content 3414 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698