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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.h

Issue 267653005: Adds HotwordPrivate API for integrating the hotword feature to AppLauncher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "base/scoped_observer.h" 15 #include "base/scoped_observer.h"
16 #include "chrome/browser/profiles/profile_info_cache_observer.h" 16 #include "chrome/browser/profiles/profile_info_cache_observer.h"
17 #include "chrome/browser/search/hotword_client.h"
17 #include "chrome/browser/signin/signin_manager_factory.h" 18 #include "chrome/browser/signin/signin_manager_factory.h"
18 #include "chrome/browser/ui/app_list/chrome_signin_delegate.h" 19 #include "chrome/browser/ui/app_list/chrome_signin_delegate.h"
19 #include "chrome/browser/ui/app_list/start_page_observer.h" 20 #include "chrome/browser/ui/app_list/start_page_observer.h"
20 #include "components/signin/core/browser/signin_manager_base.h" 21 #include "components/signin/core/browser/signin_manager_base.h"
21 #include "ui/app_list/app_list_view_delegate.h" 22 #include "ui/app_list/app_list_view_delegate.h"
22 23
23 class AppListControllerDelegate; 24 class AppListControllerDelegate;
24 class Profile; 25 class Profile;
25 26
26 namespace app_list { 27 namespace app_list {
27 class SearchController; 28 class SearchController;
28 class SpeechUIModel; 29 class SpeechUIModel;
29 } 30 }
30 31
31 namespace base { 32 namespace base {
32 class FilePath; 33 class FilePath;
33 } 34 }
34 35
35 namespace gfx { 36 namespace gfx {
36 class ImageSkia; 37 class ImageSkia;
37 } 38 }
38 39
39 #if defined(USE_ASH) 40 #if defined(USE_ASH)
40 class AppSyncUIStateWatcher; 41 class AppSyncUIStateWatcher;
41 #endif 42 #endif
42 43
43 class AppListViewDelegate : public app_list::AppListViewDelegate, 44 class AppListViewDelegate : public app_list::AppListViewDelegate,
44 public app_list::StartPageObserver, 45 public app_list::StartPageObserver,
46 public HotwordClient,
45 public ProfileInfoCacheObserver, 47 public ProfileInfoCacheObserver,
46 public SigninManagerBase::Observer, 48 public SigninManagerBase::Observer,
47 public SigninManagerFactory::Observer { 49 public SigninManagerFactory::Observer {
48 public: 50 public:
49 AppListViewDelegate(Profile* profile, 51 AppListViewDelegate(Profile* profile,
50 AppListControllerDelegate* controller); 52 AppListControllerDelegate* controller);
51 virtual ~AppListViewDelegate(); 53 virtual ~AppListViewDelegate();
52 54
53 private: 55 private:
54 // Updates the app list's current profile and ProfileMenuItems. 56 // Updates the app list's current profile and ProfileMenuItems.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual void RemoveObserver( 94 virtual void RemoveObserver(
93 app_list::AppListViewDelegateObserver* observer) OVERRIDE; 95 app_list::AppListViewDelegateObserver* observer) OVERRIDE;
94 96
95 // Overridden from app_list::StartPageObserver: 97 // Overridden from app_list::StartPageObserver:
96 virtual void OnSpeechResult(const base::string16& result, 98 virtual void OnSpeechResult(const base::string16& result,
97 bool is_final) OVERRIDE; 99 bool is_final) OVERRIDE;
98 virtual void OnSpeechSoundLevelChanged(int16 level) OVERRIDE; 100 virtual void OnSpeechSoundLevelChanged(int16 level) OVERRIDE;
99 virtual void OnSpeechRecognitionStateChanged( 101 virtual void OnSpeechRecognitionStateChanged(
100 app_list::SpeechRecognitionState new_state) OVERRIDE; 102 app_list::SpeechRecognitionState new_state) OVERRIDE;
101 103
104 // Overridden from HotwordClient:
105 virtual void OnHotwordStateChanged(bool started) OVERRIDE;
106 virtual void OnHotwordRecognized() OVERRIDE;
107
102 // Overridden from SigninManagerFactory::Observer: 108 // Overridden from SigninManagerFactory::Observer:
103 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE; 109 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE;
104 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE; 110 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE;
105 111
106 // Overridden from SigninManagerBase::Observer: 112 // Overridden from SigninManagerBase::Observer:
107 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) OVERRIDE; 113 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) OVERRIDE;
108 virtual void GoogleSigninSucceeded(const std::string& username, 114 virtual void GoogleSigninSucceeded(const std::string& username,
109 const std::string& password) OVERRIDE; 115 const std::string& password) OVERRIDE;
110 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; 116 virtual void GoogleSignedOut(const std::string& username) OVERRIDE;
111 117
(...skipping 29 matching lines...) Expand all
141 ObserverList<app_list::AppListViewDelegateObserver> observers_; 147 ObserverList<app_list::AppListViewDelegateObserver> observers_;
142 148
143 // Used to track the SigninManagers that this instance is observing so that 149 // Used to track the SigninManagers that this instance is observing so that
144 // this instance can be removed as an observer on its destruction. 150 // this instance can be removed as an observer on its destruction.
145 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; 151 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_;
146 152
147 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 153 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
148 }; 154 };
149 155
150 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 156 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698