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

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

Issue 105773004: Introduces the speech recognition UI to app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 "chrome/browser/profiles/profile_info_cache_observer.h" 15 #include "chrome/browser/profiles/profile_info_cache_observer.h"
16 #include "chrome/browser/ui/app_list/chrome_signin_delegate.h" 16 #include "chrome/browser/ui/app_list/chrome_signin_delegate.h"
17 #include "chrome/browser/ui/app_list/start_page_observer.h" 17 #include "chrome/browser/ui/app_list/start_page_observer.h"
18 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
20 #include "ui/app_list/app_list_view_delegate.h" 20 #include "ui/app_list/app_list_view_delegate.h"
21 #include "ui/app_list/speech_ui_model.h"
21 22
22 class AppListControllerDelegate; 23 class AppListControllerDelegate;
23 class Profile; 24 class Profile;
24 25
25 namespace app_list { 26 namespace app_list {
26 class SearchController; 27 class SearchController;
27 } 28 }
28 29
29 namespace base { 30 namespace base {
30 class FilePath; 31 class FilePath;
(...skipping 25 matching lines...) Expand all
56 // Registers the current profile for notifications. 57 // Registers the current profile for notifications.
57 void RegisterForNotifications(); 58 void RegisterForNotifications();
58 // Updates the app list's current profile and ProfileMenuItems. 59 // Updates the app list's current profile and ProfileMenuItems.
59 void OnProfileChanged(); 60 void OnProfileChanged();
60 61
61 // Overridden from app_list::AppListViewDelegate: 62 // Overridden from app_list::AppListViewDelegate:
62 virtual bool ForceNativeDesktop() const OVERRIDE; 63 virtual bool ForceNativeDesktop() const OVERRIDE;
63 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE; 64 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE;
64 virtual app_list::AppListModel* GetModel() OVERRIDE; 65 virtual app_list::AppListModel* GetModel() OVERRIDE;
65 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE; 66 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE;
67 virtual app_list::SpeechUIModel* GetSpeechUI() OVERRIDE;
66 virtual void GetShortcutPathForApp( 68 virtual void GetShortcutPathForApp(
67 const std::string& app_id, 69 const std::string& app_id,
68 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; 70 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
69 virtual void StartSearch() OVERRIDE; 71 virtual void StartSearch() OVERRIDE;
70 virtual void StopSearch() OVERRIDE; 72 virtual void StopSearch() OVERRIDE;
71 virtual void OpenSearchResult(app_list::SearchResult* result, 73 virtual void OpenSearchResult(app_list::SearchResult* result,
72 int event_flags) OVERRIDE; 74 int event_flags) OVERRIDE;
73 virtual void InvokeSearchResultAction(app_list::SearchResult* result, 75 virtual void InvokeSearchResultAction(app_list::SearchResult* result,
74 int action_index, 76 int action_index,
75 int event_flags) OVERRIDE; 77 int event_flags) OVERRIDE;
76 virtual void Dismiss() OVERRIDE; 78 virtual void Dismiss() OVERRIDE;
77 virtual void ViewClosing() OVERRIDE; 79 virtual void ViewClosing() OVERRIDE;
78 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; 80 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
79 virtual void OpenSettings() OVERRIDE; 81 virtual void OpenSettings() OVERRIDE;
80 virtual void OpenHelp() OVERRIDE; 82 virtual void OpenHelp() OVERRIDE;
81 virtual void OpenFeedback() OVERRIDE; 83 virtual void OpenFeedback() OVERRIDE;
82 virtual void ToggleSpeechRecognition() OVERRIDE; 84 virtual void ToggleSpeechRecognition() OVERRIDE;
83 virtual void ShowForProfileByPath( 85 virtual void ShowForProfileByPath(
84 const base::FilePath& profile_path) OVERRIDE; 86 const base::FilePath& profile_path) OVERRIDE;
85 virtual content::WebContents* GetStartPageContents() OVERRIDE; 87 virtual content::WebContents* GetStartPageContents() OVERRIDE;
86 virtual const Users& GetUsers() const OVERRIDE; 88 virtual const Users& GetUsers() const OVERRIDE;
87 virtual void AddObserver( 89 virtual void AddObserver(
88 app_list::AppListViewDelegateObserver* observer) OVERRIDE; 90 app_list::AppListViewDelegateObserver* observer) OVERRIDE;
89 virtual void RemoveObserver( 91 virtual void RemoveObserver(
90 app_list::AppListViewDelegateObserver* observer) OVERRIDE; 92 app_list::AppListViewDelegateObserver* observer) OVERRIDE;
91 93
92 // Overridden from app_list::StartPageObserver: 94 // Overridden from app_list::StartPageObserver:
93 virtual void OnSearch(const base::string16& query) OVERRIDE; 95 virtual void OnSpeechResult(const base::string16& result,
94 virtual void OnSpeechRecognitionStateChanged(bool recognizing) OVERRIDE; 96 bool is_final) OVERRIDE;
97 virtual void OnSpeechSoundLevelChanged(int16 level) OVERRIDE;
98 virtual void OnSpeechRecognitionStateChanged(
99 app_list::SpeechRecognitionState new_state) OVERRIDE;
95 100
96 // Overridden from content::NotificationObserver: 101 // Overridden from content::NotificationObserver:
97 virtual void Observe(int type, 102 virtual void Observe(int type,
98 const content::NotificationSource& source, 103 const content::NotificationSource& source,
99 const content::NotificationDetails& details) OVERRIDE; 104 const content::NotificationDetails& details) OVERRIDE;
100 105
101 // Overridden from ProfileInfoCacheObserver: 106 // Overridden from ProfileInfoCacheObserver:
102 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; 107 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE;
103 virtual void OnProfileWasRemoved(const base::FilePath& profile_path, 108 virtual void OnProfileWasRemoved(const base::FilePath& profile_path,
104 const base::string16& profile_name) OVERRIDE; 109 const base::string16& profile_name) OVERRIDE;
105 virtual void OnProfileNameChanged( 110 virtual void OnProfileNameChanged(
106 const base::FilePath& profile_path, 111 const base::FilePath& profile_path,
107 const base::string16& old_profile_name) OVERRIDE; 112 const base::string16& old_profile_name) OVERRIDE;
108 113
109 scoped_ptr<app_list::SearchController> search_controller_; 114 scoped_ptr<app_list::SearchController> search_controller_;
110 // Unowned pointer to the controller. 115 // Unowned pointer to the controller.
111 AppListControllerDelegate* controller_; 116 AppListControllerDelegate* controller_;
112 // Unowned pointer to the associated profile. May change if SetProfileByPath 117 // Unowned pointer to the associated profile. May change if SetProfileByPath
113 // is called. 118 // is called.
114 Profile* profile_; 119 Profile* profile_;
115 // Unowned pointer to the model owned by AppListSyncableService. Will change 120 // Unowned pointer to the model owned by AppListSyncableService. Will change
116 // if |profile_| changes. 121 // if |profile_| changes.
117 app_list::AppListModel* model_; 122 app_list::AppListModel* model_;
118 123
124 app_list::SpeechUIModel speech_ui_;
125
119 Users users_; 126 Users users_;
120 127
121 content::NotificationRegistrar registrar_; 128 content::NotificationRegistrar registrar_;
122 ChromeSigninDelegate signin_delegate_; 129 ChromeSigninDelegate signin_delegate_;
123 #if defined(USE_ASH) 130 #if defined(USE_ASH)
124 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; 131 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_;
125 #endif 132 #endif
126 133
127 ObserverList<app_list::AppListViewDelegateObserver> observers_; 134 ObserverList<app_list::AppListViewDelegateObserver> observers_;
128 135
129 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 136 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
130 }; 137 };
131 138
132 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 139 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/app_list/speech_recognition_manager.js ('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