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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 456513002: Add base:: qualification to some CommandLine references in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: imerge Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } else { 120 } else {
121 params->redirects.clear(); 121 params->redirects.clear();
122 } 122 }
123 123
124 params->can_load_local_resources = entry.GetCanLoadLocalResources(); 124 params->can_load_local_resources = entry.GetCanLoadLocalResources();
125 params->frame_to_navigate = entry.GetFrameToNavigate(); 125 params->frame_to_navigate = entry.GetFrameToNavigate();
126 params->browser_navigation_start = navigation_start; 126 params->browser_navigation_start = navigation_start;
127 } 127 }
128 128
129 RenderFrameHostManager* GetRenderManager(RenderFrameHostImpl* rfh) { 129 RenderFrameHostManager* GetRenderManager(RenderFrameHostImpl* rfh) {
130 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) 130 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
131 switches::kSitePerProcess))
131 return rfh->frame_tree_node()->render_manager(); 132 return rfh->frame_tree_node()->render_manager();
132 133
133 return rfh->frame_tree_node()->frame_tree()->root()->render_manager(); 134 return rfh->frame_tree_node()->frame_tree()->root()->render_manager();
134 } 135 }
135 136
136 } // namespace 137 } // namespace
137 138
138 139
139 NavigatorImpl::NavigatorImpl( 140 NavigatorImpl::NavigatorImpl(
140 NavigationControllerImpl* navigation_controller, 141 NavigationControllerImpl* navigation_controller,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 412
412 base::TimeTicks NavigatorImpl::GetCurrentLoadStart() { 413 base::TimeTicks NavigatorImpl::GetCurrentLoadStart() {
413 return current_load_start_; 414 return current_load_start_;
414 } 415 }
415 416
416 void NavigatorImpl::DidNavigate( 417 void NavigatorImpl::DidNavigate(
417 RenderFrameHostImpl* render_frame_host, 418 RenderFrameHostImpl* render_frame_host,
418 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) { 419 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) {
419 FrameHostMsg_DidCommitProvisionalLoad_Params params(input_params); 420 FrameHostMsg_DidCommitProvisionalLoad_Params params(input_params);
420 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree(); 421 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
421 bool use_site_per_process = 422 bool use_site_per_process = base::CommandLine::ForCurrentProcess()->HasSwitch(
422 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess); 423 switches::kSitePerProcess);
423 424
424 if (use_site_per_process) { 425 if (use_site_per_process) {
425 // TODO(creis): Until we mirror the frame tree in the subframe's process, 426 // TODO(creis): Until we mirror the frame tree in the subframe's process,
426 // cross-process subframe navigations happen in a renderer's main frame. 427 // cross-process subframe navigations happen in a renderer's main frame.
427 // Correct the transition type here if we know it is for a subframe. 428 // Correct the transition type here if we know it is for a subframe.
428 NavigationEntryImpl* pending_entry = 429 NavigationEntryImpl* pending_entry =
429 NavigationEntryImpl::FromNavigationEntry( 430 NavigationEntryImpl::FromNavigationEntry(
430 controller_->GetPendingEntry()); 431 controller_->GetPendingEntry());
431 if (!render_frame_host->frame_tree_node()->IsMainFrame() && 432 if (!render_frame_host->frame_tree_node()->IsMainFrame() &&
432 pending_entry && 433 pending_entry &&
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 GURL dest_url(url); 598 GURL dest_url(url);
598 SiteInstance* current_site_instance = 599 SiteInstance* current_site_instance =
599 GetRenderManager(render_frame_host)->current_frame_host()-> 600 GetRenderManager(render_frame_host)->current_frame_host()->
600 GetSiteInstance(); 601 GetSiteInstance();
601 if (!GetContentClient()->browser()->ShouldAllowOpenURL( 602 if (!GetContentClient()->browser()->ShouldAllowOpenURL(
602 current_site_instance, url)) { 603 current_site_instance, url)) {
603 dest_url = GURL(url::kAboutBlankURL); 604 dest_url = GURL(url::kAboutBlankURL);
604 } 605 }
605 606
606 int64 frame_tree_node_id = -1; 607 int64 frame_tree_node_id = -1;
607 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { 608 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
609 switches::kSitePerProcess)) {
608 frame_tree_node_id = 610 frame_tree_node_id =
609 render_frame_host->frame_tree_node()->frame_tree_node_id(); 611 render_frame_host->frame_tree_node()->frame_tree_node_id();
610 } 612 }
611 OpenURLParams params( 613 OpenURLParams params(
612 dest_url, referrer, frame_tree_node_id, disposition, page_transition, 614 dest_url, referrer, frame_tree_node_id, disposition, page_transition,
613 true /* is_renderer_initiated */); 615 true /* is_renderer_initiated */);
614 if (redirect_chain.size() > 0) 616 if (redirect_chain.size() > 0)
615 params.redirect_chain = redirect_chain; 617 params.redirect_chain = redirect_chain;
616 params.transferred_global_request_id = transferred_global_request_id; 618 params.transferred_global_request_id = transferred_global_request_id;
617 params.should_replace_current_entry = should_replace_current_entry; 619 params.should_replace_current_entry = should_replace_current_entry;
(...skipping 17 matching lines...) Expand all
635 637
636 // Navigations in Web UI pages count as browser-initiated navigations. 638 // Navigations in Web UI pages count as browser-initiated navigations.
637 params.is_renderer_initiated = false; 639 params.is_renderer_initiated = false;
638 } 640 }
639 641
640 if (delegate_) 642 if (delegate_)
641 delegate_->RequestOpenURL(render_frame_host, params); 643 delegate_->RequestOpenURL(render_frame_host, params);
642 } 644 }
643 645
644 } // namespace content 646 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_screenshot_manager.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698