| OLD | NEW |
| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 : tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url)); | 359 : tab_util::GetSiteInstanceForNewTab(params.browser->profile(), url)); |
| 360 create_params.main_frame_name = params.frame_name; | 360 create_params.main_frame_name = params.frame_name; |
| 361 if (params.source_contents) { | 361 if (params.source_contents) { |
| 362 create_params.initial_size = | 362 create_params.initial_size = |
| 363 params.source_contents->GetContainerBounds().size(); | 363 params.source_contents->GetContainerBounds().size(); |
| 364 create_params.created_with_opener = params.created_with_opener; | 364 create_params.created_with_opener = params.created_with_opener; |
| 365 } | 365 } |
| 366 if (params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) | 366 if (params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) |
| 367 create_params.initially_hidden = true; | 367 create_params.initially_hidden = true; |
| 368 | 368 |
| 369 create_params.created_from_context_menu = params.started_from_context_menu; |
| 370 create_params.target_url = params.url; |
| 371 create_params.source_web_contents = params.source_contents; |
| 372 create_params.disposition = params.disposition; |
| 373 create_params.transition = params.transition; |
| 374 |
| 369 #if defined(USE_AURA) | 375 #if defined(USE_AURA) |
| 370 if (params.browser->window() && | 376 if (params.browser->window() && |
| 371 params.browser->window()->GetNativeWindow()) { | 377 params.browser->window()->GetNativeWindow()) { |
| 372 create_params.context = | 378 create_params.context = |
| 373 params.browser->window()->GetNativeWindow(); | 379 params.browser->window()->GetNativeWindow(); |
| 374 } | 380 } |
| 375 #endif | 381 #endif |
| 376 | 382 |
| 377 WebContents* target_contents = WebContents::Create(create_params); | 383 WebContents* target_contents = WebContents::Create(create_params); |
| 378 | 384 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 bool reverse_on_redirect = false; | 680 bool reverse_on_redirect = false; |
| 675 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( | 681 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( |
| 676 &rewritten_url, browser_context, &reverse_on_redirect); | 682 &rewritten_url, browser_context, &reverse_on_redirect); |
| 677 | 683 |
| 678 // Some URLs are mapped to uber subpages. Do not allow them in incognito. | 684 // Some URLs are mapped to uber subpages. Do not allow them in incognito. |
| 679 return !(rewritten_url.scheme() == content::kChromeUIScheme && | 685 return !(rewritten_url.scheme() == content::kChromeUIScheme && |
| 680 rewritten_url.host() == chrome::kChromeUIUberHost); | 686 rewritten_url.host() == chrome::kChromeUIUberHost); |
| 681 } | 687 } |
| 682 | 688 |
| 683 } // namespace chrome | 689 } // namespace chrome |
| OLD | NEW |