| 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/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 extension_misc::kSettingsAppId, | 578 extension_misc::kSettingsAppId, |
| 579 extensions::ExtensionRegistry::EVERYTHING); | 579 extensions::ExtensionRegistry::EVERYTHING); |
| 580 DCHECK(extension); | 580 DCHECK(extension); |
| 581 controller_->ActivateApp(profile_, | 581 controller_->ActivateApp(profile_, |
| 582 extension, | 582 extension, |
| 583 AppListControllerDelegate::LAUNCH_FROM_UNKNOWN, | 583 AppListControllerDelegate::LAUNCH_FROM_UNKNOWN, |
| 584 0); | 584 0); |
| 585 } | 585 } |
| 586 | 586 |
| 587 void AppListViewDelegate::OpenHelp() { | 587 void AppListViewDelegate::OpenHelp() { |
| 588 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow( | 588 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); |
| 589 controller_->GetAppListWindow()); | |
| 590 chrome::ScopedTabbedBrowserDisplayer displayer(profile_, desktop); | |
| 591 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), | 589 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), |
| 592 content::Referrer(), | 590 content::Referrer(), |
| 593 NEW_FOREGROUND_TAB, | 591 NEW_FOREGROUND_TAB, |
| 594 ui::PAGE_TRANSITION_LINK, | 592 ui::PAGE_TRANSITION_LINK, |
| 595 false); | 593 false); |
| 596 displayer.browser()->OpenURL(params); | 594 displayer.browser()->OpenURL(params); |
| 597 } | 595 } |
| 598 | 596 |
| 599 void AppListViewDelegate::OpenFeedback() { | 597 void AppListViewDelegate::OpenFeedback() { |
| 600 Browser* browser = chrome::FindTabbedBrowser(profile_, false); | 598 Browser* browser = chrome::FindTabbedBrowser(profile_, false); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 822 |
| 825 // SigninManagerFactory is not a leaky singleton (unlike this class), and | 823 // SigninManagerFactory is not a leaky singleton (unlike this class), and |
| 826 // its destructor will check that it has no remaining observers. | 824 // its destructor will check that it has no remaining observers. |
| 827 scoped_observer_.RemoveAll(); | 825 scoped_observer_.RemoveAll(); |
| 828 SigninManagerFactory::GetInstance()->RemoveObserver(this); | 826 SigninManagerFactory::GetInstance()->RemoveObserver(this); |
| 829 break; | 827 break; |
| 830 default: | 828 default: |
| 831 NOTREACHED(); | 829 NOTREACHED(); |
| 832 } | 830 } |
| 833 } | 831 } |
| OLD | NEW |