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

Side by Side Diff: chrome/browser/ui/browser_navigator.cc

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/browser_navigator.h ('k') | content/browser/frame_host/frame_tree.h » ('j') | 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 "chrome/browser/ui/browser_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 return params->initiating_profile; 240 return params->initiating_profile;
241 } 241 }
242 242
243 void LoadURLInContents(WebContents* target_contents, 243 void LoadURLInContents(WebContents* target_contents,
244 const GURL& url, 244 const GURL& url,
245 chrome::NavigateParams* params) { 245 chrome::NavigateParams* params) {
246 NavigationController::LoadURLParams load_url_params(url); 246 NavigationController::LoadURLParams load_url_params(url);
247 load_url_params.referrer = params->referrer; 247 load_url_params.referrer = params->referrer;
248 load_url_params.frame_tree_node_id = params->frame_tree_node_id;
248 load_url_params.redirect_chain = params->redirect_chain; 249 load_url_params.redirect_chain = params->redirect_chain;
249 load_url_params.transition_type = params->transition; 250 load_url_params.transition_type = params->transition;
250 load_url_params.extra_headers = params->extra_headers; 251 load_url_params.extra_headers = params->extra_headers;
251 load_url_params.should_replace_current_entry = 252 load_url_params.should_replace_current_entry =
252 params->should_replace_current_entry; 253 params->should_replace_current_entry;
253 254
254 if (params->transferred_global_request_id != GlobalRequestID()) { 255 if (params->transferred_global_request_id != GlobalRequestID()) {
255 load_url_params.is_renderer_initiated = params->is_renderer_initiated; 256 load_url_params.is_renderer_initiated = params->is_renderer_initiated;
256 load_url_params.transferred_global_request_id = 257 load_url_params.transferred_global_request_id =
257 params->transferred_global_request_id; 258 params->transferred_global_request_id;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 382 }
382 383
383 } // namespace 384 } // namespace
384 385
385 namespace chrome { 386 namespace chrome {
386 387
387 NavigateParams::NavigateParams(Browser* a_browser, 388 NavigateParams::NavigateParams(Browser* a_browser,
388 const GURL& a_url, 389 const GURL& a_url,
389 content::PageTransition a_transition) 390 content::PageTransition a_transition)
390 : url(a_url), 391 : url(a_url),
392 frame_tree_node_id(-1),
391 uses_post(false), 393 uses_post(false),
392 target_contents(NULL), 394 target_contents(NULL),
393 source_contents(NULL), 395 source_contents(NULL),
394 disposition(CURRENT_TAB), 396 disposition(CURRENT_TAB),
395 transition(a_transition), 397 transition(a_transition),
396 is_renderer_initiated(false), 398 is_renderer_initiated(false),
397 tabstrip_index(-1), 399 tabstrip_index(-1),
398 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 400 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
399 window_action(NO_ACTION), 401 window_action(NO_ACTION),
400 user_gesture(true), 402 user_gesture(true),
401 path_behavior(RESPECT), 403 path_behavior(RESPECT),
402 ref_behavior(IGNORE_REF), 404 ref_behavior(IGNORE_REF),
403 browser(a_browser), 405 browser(a_browser),
404 initiating_profile(NULL), 406 initiating_profile(NULL),
405 host_desktop_type(GetHostDesktop(a_browser)), 407 host_desktop_type(GetHostDesktop(a_browser)),
406 should_replace_current_entry(false), 408 should_replace_current_entry(false),
407 should_set_opener(false) { 409 should_set_opener(false) {
408 } 410 }
409 411
410 NavigateParams::NavigateParams(Browser* a_browser, 412 NavigateParams::NavigateParams(Browser* a_browser,
411 WebContents* a_target_contents) 413 WebContents* a_target_contents)
412 : uses_post(false), 414 : frame_tree_node_id(-1),
415 uses_post(false),
413 target_contents(a_target_contents), 416 target_contents(a_target_contents),
414 source_contents(NULL), 417 source_contents(NULL),
415 disposition(CURRENT_TAB), 418 disposition(CURRENT_TAB),
416 transition(content::PAGE_TRANSITION_LINK), 419 transition(content::PAGE_TRANSITION_LINK),
417 is_renderer_initiated(false), 420 is_renderer_initiated(false),
418 tabstrip_index(-1), 421 tabstrip_index(-1),
419 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 422 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
420 window_action(NO_ACTION), 423 window_action(NO_ACTION),
421 user_gesture(true), 424 user_gesture(true),
422 path_behavior(RESPECT), 425 path_behavior(RESPECT),
423 ref_behavior(IGNORE_REF), 426 ref_behavior(IGNORE_REF),
424 browser(a_browser), 427 browser(a_browser),
425 initiating_profile(NULL), 428 initiating_profile(NULL),
426 host_desktop_type(GetHostDesktop(a_browser)), 429 host_desktop_type(GetHostDesktop(a_browser)),
427 should_replace_current_entry(false), 430 should_replace_current_entry(false),
428 should_set_opener(false) { 431 should_set_opener(false) {
429 } 432 }
430 433
431 NavigateParams::NavigateParams(Profile* a_profile, 434 NavigateParams::NavigateParams(Profile* a_profile,
432 const GURL& a_url, 435 const GURL& a_url,
433 content::PageTransition a_transition) 436 content::PageTransition a_transition)
434 : url(a_url), 437 : url(a_url),
438 frame_tree_node_id(-1),
435 uses_post(false), 439 uses_post(false),
436 target_contents(NULL), 440 target_contents(NULL),
437 source_contents(NULL), 441 source_contents(NULL),
438 disposition(NEW_FOREGROUND_TAB), 442 disposition(NEW_FOREGROUND_TAB),
439 transition(a_transition), 443 transition(a_transition),
440 is_renderer_initiated(false), 444 is_renderer_initiated(false),
441 tabstrip_index(-1), 445 tabstrip_index(-1),
442 tabstrip_add_types(TabStripModel::ADD_ACTIVE), 446 tabstrip_add_types(TabStripModel::ADD_ACTIVE),
443 window_action(SHOW_WINDOW), 447 window_action(SHOW_WINDOW),
444 user_gesture(true), 448 user_gesture(true),
445 path_behavior(RESPECT), 449 path_behavior(RESPECT),
446 ref_behavior(IGNORE_REF), 450 ref_behavior(IGNORE_REF),
447 browser(NULL), 451 browser(NULL),
448 initiating_profile(a_profile), 452 initiating_profile(a_profile),
449 host_desktop_type(chrome::GetActiveDesktop()), 453 host_desktop_type(chrome::GetActiveDesktop()),
450 should_replace_current_entry(false), 454 should_replace_current_entry(false),
451 should_set_opener(false) { 455 should_set_opener(false) {
452 } 456 }
453 457
454 NavigateParams::~NavigateParams() {} 458 NavigateParams::~NavigateParams() {}
455 459
456 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params, 460 void FillNavigateParamsFromOpenURLParams(chrome::NavigateParams* nav_params,
457 const content::OpenURLParams& params) { 461 const content::OpenURLParams& params) {
458 nav_params->referrer = params.referrer; 462 nav_params->referrer = params.referrer;
463 nav_params->frame_tree_node_id = params.frame_tree_node_id;
459 nav_params->redirect_chain = params.redirect_chain; 464 nav_params->redirect_chain = params.redirect_chain;
460 nav_params->extra_headers = params.extra_headers; 465 nav_params->extra_headers = params.extra_headers;
461 nav_params->disposition = params.disposition; 466 nav_params->disposition = params.disposition;
462 nav_params->is_renderer_initiated = params.is_renderer_initiated; 467 nav_params->is_renderer_initiated = params.is_renderer_initiated;
463 nav_params->transferred_global_request_id = 468 nav_params->transferred_global_request_id =
464 params.transferred_global_request_id; 469 params.transferred_global_request_id;
465 nav_params->should_replace_current_entry = 470 nav_params->should_replace_current_entry =
466 params.should_replace_current_entry; 471 params.should_replace_current_entry;
467 nav_params->uses_post = params.uses_post; 472 nav_params->uses_post = params.uses_post;
468 nav_params->browser_initiated_post_data = params.browser_initiated_post_data; 473 nav_params->browser_initiated_post_data = params.browser_initiated_post_data;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 bool reverse_on_redirect = false; 706 bool reverse_on_redirect = false;
702 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 707 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
703 &rewritten_url, browser_context, &reverse_on_redirect); 708 &rewritten_url, browser_context, &reverse_on_redirect);
704 709
705 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 710 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
706 return !(rewritten_url.scheme() == chrome::kChromeUIScheme && 711 return !(rewritten_url.scheme() == chrome::kChromeUIScheme &&
707 rewritten_url.host() == chrome::kChromeUIUberHost); 712 rewritten_url.host() == chrome::kChromeUIUberHost);
708 } 713 }
709 714
710 } // namespace chrome 715 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.h ('k') | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698