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

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

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 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
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/chrome_pages.h" 5 #include "chrome/browser/ui/chrome_pages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 #endif 328 #endif
329 329
330 if (::switches::SettingsWindowEnabled()) { 330 if (::switches::SettingsWindowEnabled()) {
331 content::RecordAction(base::UserMetricsAction("ShowOptions")); 331 content::RecordAction(base::UserMetricsAction("ShowOptions"));
332 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( 332 SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
333 profile, GetSettingsUrl(sub_page_path)); 333 profile, GetSettingsUrl(sub_page_path));
334 return; 334 return;
335 } 335 }
336 Browser* browser = chrome::FindTabbedBrowser(profile, false); 336 Browser* browser = chrome::FindTabbedBrowser(profile, false);
337 if (!browser) { 337 if (!browser) {
338 browser = new Browser(Browser::CreateParams(profile)); 338 browser = new Browser(Browser::CreateParams(profile, true));
339 } 339 }
340 ShowSettingsSubPageInTabbedBrowser(browser, sub_page_path); 340 ShowSettingsSubPageInTabbedBrowser(browser, sub_page_path);
341 } 341 }
342 342
343 void ShowSettingsSubPageInTabbedBrowser(Browser* browser, 343 void ShowSettingsSubPageInTabbedBrowser(Browser* browser,
344 const std::string& sub_page) { 344 const std::string& sub_page) {
345 content::RecordAction(UserMetricsAction("ShowOptions")); 345 content::RecordAction(UserMetricsAction("ShowOptions"));
346 GURL gurl = GetSettingsUrl(sub_page); 346 GURL gurl = GetSettingsUrl(sub_page);
347 NavigateParams params(GetSingletonTabNavigateParams(browser, gurl)); 347 NavigateParams params(GetSingletonTabNavigateParams(browser, gurl));
348 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; 348 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 SigninManagerFactory::GetForProfile(original_profile); 455 SigninManagerFactory::GetForProfile(original_profile);
456 DCHECK(manager->IsSigninAllowed()); 456 DCHECK(manager->IsSigninAllowed());
457 if (manager->IsAuthenticated()) 457 if (manager->IsAuthenticated())
458 ShowSettings(browser); 458 ShowSettings(browser);
459 else 459 else
460 ShowBrowserSignin(browser, access_point); 460 ShowBrowserSignin(browser, access_point);
461 } 461 }
462 #endif 462 #endif
463 463
464 } // namespace chrome 464 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698