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

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

Powered by Google App Engine
This is Rietveld 408576698