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

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: fix 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void RemoveObserver( 93 virtual void RemoveObserver(
92 app_list::AppListViewDelegateObserver* observer) OVERRIDE; 94 app_list::AppListViewDelegateObserver* observer) OVERRIDE;
93 95
94 // Overridden from app_list::StartPageObserver: 96 // Overridden from app_list::StartPageObserver:
95 virtual void OnSpeechResult(const base::string16& result, 97 virtual void OnSpeechResult(const base::string16& result,
96 bool is_final) OVERRIDE; 98 bool is_final) OVERRIDE;
97 virtual void OnSpeechSoundLevelChanged(int16 level) OVERRIDE; 99 virtual void OnSpeechSoundLevelChanged(int16 level) OVERRIDE;
98 virtual void OnSpeechRecognitionStateChanged( 100 virtual void OnSpeechRecognitionStateChanged(
99 app_list::SpeechRecognitionState new_state) OVERRIDE; 101 app_list::SpeechRecognitionState new_state) OVERRIDE;
100 102
103 // Overridden from HotwordClient:
104 virtual void OnHotwordStateChanged(bool enabled) OVERRIDE;
105 virtual void OnHotwordRecognized() OVERRIDE;
106
101 // Overridden from SigninManagerFactory::Observer: 107 // Overridden from SigninManagerFactory::Observer:
102 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE; 108 virtual void SigninManagerCreated(SigninManagerBase* manager) OVERRIDE;
103 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE; 109 virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE;
104 110
105 // Overridden from SigninManagerBase::Observer: 111 // Overridden from SigninManagerBase::Observer:
106 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) OVERRIDE; 112 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) OVERRIDE;
107 virtual void GoogleSigninSucceeded(const std::string& username, 113 virtual void GoogleSigninSucceeded(const std::string& username,
108 const std::string& password) OVERRIDE; 114 const std::string& password) OVERRIDE;
109 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; 115 virtual void GoogleSignedOut(const std::string& username) OVERRIDE;
110 116
(...skipping 29 matching lines...) Expand all
140 ObserverList<app_list::AppListViewDelegateObserver> observers_; 146 ObserverList<app_list::AppListViewDelegateObserver> observers_;
141 147
142 // Used to track the SigninManagers that this instance is observing so that 148 // Used to track the SigninManagers that this instance is observing so that
143 // this instance can be removed as an observer on its destruction. 149 // this instance can be removed as an observer on its destruction.
144 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; 150 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_;
145 151
146 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 152 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
147 }; 153 };
148 154
149 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 155 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698