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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 chrome::ScopedTabbedBrowserDisplayer displayer(profile_, desktop); | 590 chrome::ScopedTabbedBrowserDisplayer displayer(profile_, desktop); |
591 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), | 591 content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), |
592 content::Referrer(), | 592 content::Referrer(), |
593 NEW_FOREGROUND_TAB, | 593 NEW_FOREGROUND_TAB, |
594 ui::PAGE_TRANSITION_LINK, | 594 ui::PAGE_TRANSITION_LINK, |
595 false); | 595 false); |
596 displayer.browser()->OpenURL(params); | 596 displayer.browser()->OpenURL(params); |
597 } | 597 } |
598 | 598 |
599 void AppListViewDelegate::OpenFeedback() { | 599 void AppListViewDelegate::OpenFeedback() { |
600 chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow( | 600 Browser* browser = chrome::FindTabbedBrowser(profile_, false); |
601 controller_->GetAppListWindow()); | |
602 Browser* browser = chrome::FindTabbedBrowser(profile_, false, desktop); | |
603 chrome::ShowFeedbackPage(browser, std::string(), | 601 chrome::ShowFeedbackPage(browser, std::string(), |
604 chrome::kAppLauncherCategoryTag); | 602 chrome::kAppLauncherCategoryTag); |
605 } | 603 } |
606 | 604 |
607 void AppListViewDelegate::StartSpeechRecognition() { | 605 void AppListViewDelegate::StartSpeechRecognition() { |
608 StartSpeechRecognitionForHotword(nullptr); | 606 StartSpeechRecognitionForHotword(nullptr); |
609 } | 607 } |
610 | 608 |
611 void AppListViewDelegate::StopSpeechRecognition() { | 609 void AppListViewDelegate::StopSpeechRecognition() { |
612 app_list::StartPageService* service = | 610 app_list::StartPageService* service = |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 | 824 |
827 // SigninManagerFactory is not a leaky singleton (unlike this class), and | 825 // SigninManagerFactory is not a leaky singleton (unlike this class), and |
828 // its destructor will check that it has no remaining observers. | 826 // its destructor will check that it has no remaining observers. |
829 scoped_observer_.RemoveAll(); | 827 scoped_observer_.RemoveAll(); |
830 SigninManagerFactory::GetInstance()->RemoveObserver(this); | 828 SigninManagerFactory::GetInstance()->RemoveObserver(this); |
831 break; | 829 break; |
832 default: | 830 default: |
833 NOTREACHED(); | 831 NOTREACHED(); |
834 } | 832 } |
835 } | 833 } |
OLD | NEW |