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

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

Issue 12246003: Make use of CreateWebUIForRenderManager (doesn't change the actual behavior) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 "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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 } 2478 }
2479 2479
2480 void WebContentsImpl::DidNavigateMainFramePostCommit( 2480 void WebContentsImpl::DidNavigateMainFramePostCommit(
2481 const LoadCommittedDetails& details, 2481 const LoadCommittedDetails& details,
2482 const ViewHostMsg_FrameNavigate_Params& params) { 2482 const ViewHostMsg_FrameNavigate_Params& params) {
2483 if (opener_web_ui_type_ != WebUI::kNoWebUI) { 2483 if (opener_web_ui_type_ != WebUI::kNoWebUI) {
2484 // If this is a window.open navigation, use the same WebUI as the renderer 2484 // If this is a window.open navigation, use the same WebUI as the renderer
2485 // that opened the window, as long as both renderers have the same 2485 // that opened the window, as long as both renderers have the same
2486 // privileges. 2486 // privileges.
2487 if (delegate_ && opener_web_ui_type_ == GetWebUITypeForCurrentState()) { 2487 if (delegate_ && opener_web_ui_type_ == GetWebUITypeForCurrentState()) {
2488 WebUIImpl* web_ui = static_cast<WebUIImpl*>(CreateWebUI(GetURL())); 2488 WebUIImpl* web_ui = CreateWebUIForRenderManager(GetURL());
2489 // web_ui might be NULL if the URL refers to a non-existent extension. 2489 // web_ui might be NULL if the URL refers to a non-existent extension.
2490 if (web_ui) { 2490 if (web_ui) {
2491 render_manager_.SetWebUIPostCommit(web_ui); 2491 render_manager_.SetWebUIPostCommit(web_ui);
2492 web_ui->RenderViewCreated(GetRenderViewHost()); 2492 web_ui->RenderViewCreated(GetRenderViewHost());
2493 } 2493 }
2494 } 2494 }
2495 opener_web_ui_type_ = WebUI::kNoWebUI; 2495 opener_web_ui_type_ = WebUI::kNoWebUI;
2496 } 2496 }
2497 2497
2498 if (details.is_navigation_to_different_page()) { 2498 if (details.is_navigation_to_different_page()) {
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 3452
3453 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3453 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3454 return browser_plugin_guest_.get(); 3454 return browser_plugin_guest_.get();
3455 } 3455 }
3456 3456
3457 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3457 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3458 return browser_plugin_embedder_.get(); 3458 return browser_plugin_embedder_.get();
3459 } 3459 }
3460 3460
3461 } // namespace content 3461 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698