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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 500 |
501 base::string16 ChromeShellDelegate::GetProductName() const { | 501 base::string16 ChromeShellDelegate::GetProductName() const { |
502 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 502 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
503 } | 503 } |
504 | 504 |
505 void ChromeShellDelegate::OpenKeyboardShortcutHelpPage() const { | 505 void ChromeShellDelegate::OpenKeyboardShortcutHelpPage() const { |
506 Profile* profile = ProfileManager::GetActiveUserProfile(); | 506 Profile* profile = ProfileManager::GetActiveUserProfile(); |
507 Browser* browser = chrome::FindTabbedBrowser(profile, false); | 507 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
508 | 508 |
509 if (!browser) { | 509 if (!browser) { |
510 browser = new Browser(Browser::CreateParams(profile)); | 510 browser = new Browser(Browser::CreateParams(profile, true)); |
511 browser->window()->Show(); | 511 browser->window()->Show(); |
512 } | 512 } |
513 | 513 |
514 browser->window()->Activate(); | 514 browser->window()->Activate(); |
515 | 515 |
516 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), | 516 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), |
517 ui::PAGE_TRANSITION_AUTO_BOOKMARK); | 517 ui::PAGE_TRANSITION_AUTO_BOOKMARK); |
518 params.disposition = WindowOpenDisposition::SINGLETON_TAB; | 518 params.disposition = WindowOpenDisposition::SINGLETON_TAB; |
519 chrome::Navigate(¶ms); | 519 chrome::Navigate(¶ms); |
520 } | 520 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 NOTREACHED() << "Unexpected notification " << type; | 600 NOTREACHED() << "Unexpected notification " << type; |
601 } | 601 } |
602 } | 602 } |
603 | 603 |
604 void ChromeShellDelegate::PlatformInit() { | 604 void ChromeShellDelegate::PlatformInit() { |
605 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 605 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
606 content::NotificationService::AllSources()); | 606 content::NotificationService::AllSources()); |
607 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 607 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
608 content::NotificationService::AllSources()); | 608 content::NotificationService::AllSources()); |
609 } | 609 } |
OLD | NEW |