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

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

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 public app_list::StartPageObserver, 52 public app_list::StartPageObserver,
53 public HotwordClient, 53 public HotwordClient,
54 public ProfileInfoCacheObserver, 54 public ProfileInfoCacheObserver,
55 public SigninManagerBase::Observer, 55 public SigninManagerBase::Observer,
56 public SigninManagerFactory::Observer, 56 public SigninManagerFactory::Observer,
57 public content::NotificationObserver { 57 public content::NotificationObserver {
58 public: 58 public:
59 // Constructs Chrome's AppListViewDelegate with a NULL Profile. 59 // Constructs Chrome's AppListViewDelegate with a NULL Profile.
60 // Does not take ownership of |controller|. TODO(tapted): It should. 60 // Does not take ownership of |controller|. TODO(tapted): It should.
61 explicit AppListViewDelegate(AppListControllerDelegate* controller); 61 explicit AppListViewDelegate(AppListControllerDelegate* controller);
62 virtual ~AppListViewDelegate(); 62 ~AppListViewDelegate() override;
63 63
64 // Configure the AppList for the given |profile|. 64 // Configure the AppList for the given |profile|.
65 void SetProfile(Profile* profile); 65 void SetProfile(Profile* profile);
66 Profile* profile() { return profile_; } 66 Profile* profile() { return profile_; }
67 67
68 // Overridden from app_list::AppListViewDelegate: 68 // Overridden from app_list::AppListViewDelegate:
69 virtual bool ForceNativeDesktop() const override; 69 bool ForceNativeDesktop() const override;
70 virtual void SetProfileByPath(const base::FilePath& profile_path) override; 70 void SetProfileByPath(const base::FilePath& profile_path) override;
71 virtual app_list::AppListModel* GetModel() override; 71 app_list::AppListModel* GetModel() override;
72 virtual app_list::SpeechUIModel* GetSpeechUI() override; 72 app_list::SpeechUIModel* GetSpeechUI() override;
73 virtual void GetShortcutPathForApp( 73 void GetShortcutPathForApp(
74 const std::string& app_id, 74 const std::string& app_id,
75 const base::Callback<void(const base::FilePath&)>& callback) override; 75 const base::Callback<void(const base::FilePath&)>& callback) override;
76 virtual void StartSearch() override; 76 void StartSearch() override;
77 virtual void StopSearch() override; 77 void StopSearch() override;
78 virtual void OpenSearchResult(app_list::SearchResult* result, 78 void OpenSearchResult(app_list::SearchResult* result,
79 bool auto_launch, 79 bool auto_launch,
80 int event_flags) override;
81 void InvokeSearchResultAction(app_list::SearchResult* result,
82 int action_index,
80 int event_flags) override; 83 int event_flags) override;
81 virtual void InvokeSearchResultAction(app_list::SearchResult* result, 84 base::TimeDelta GetAutoLaunchTimeout() override;
82 int action_index, 85 void AutoLaunchCanceled() override;
83 int event_flags) override; 86 void ViewInitialized() override;
84 virtual base::TimeDelta GetAutoLaunchTimeout() override; 87 void Dismiss() override;
85 virtual void AutoLaunchCanceled() override; 88 void ViewClosing() override;
86 virtual void ViewInitialized() override; 89 gfx::ImageSkia GetWindowIcon() override;
87 virtual void Dismiss() override; 90 void OpenSettings() override;
88 virtual void ViewClosing() override; 91 void OpenHelp() override;
89 virtual gfx::ImageSkia GetWindowIcon() override; 92 void OpenFeedback() override;
90 virtual void OpenSettings() override; 93 void ToggleSpeechRecognition() override;
91 virtual void OpenHelp() override; 94 void ShowForProfileByPath(const base::FilePath& profile_path) override;
92 virtual void OpenFeedback() override;
93 virtual void ToggleSpeechRecognition() override;
94 virtual void ShowForProfileByPath(
95 const base::FilePath& profile_path) override;
96 #if defined(TOOLKIT_VIEWS) 95 #if defined(TOOLKIT_VIEWS)
97 virtual views::View* CreateStartPageWebView(const gfx::Size& size) override; 96 virtual views::View* CreateStartPageWebView(const gfx::Size& size) override;
98 virtual std::vector<views::View*> CreateCustomPageWebViews( 97 virtual std::vector<views::View*> CreateCustomPageWebViews(
99 const gfx::Size& size) override; 98 const gfx::Size& size) override;
100 #endif 99 #endif
101 virtual bool IsSpeechRecognitionEnabled() override; 100 bool IsSpeechRecognitionEnabled() override;
102 virtual const Users& GetUsers() const override; 101 const Users& GetUsers() const override;
103 virtual bool ShouldCenterWindow() const override; 102 bool ShouldCenterWindow() const override;
104 virtual void AddObserver( 103 void AddObserver(app_list::AppListViewDelegateObserver* observer) override;
105 app_list::AppListViewDelegateObserver* observer) override; 104 void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override;
106 virtual void RemoveObserver(
107 app_list::AppListViewDelegateObserver* observer) override;
108 105
109 private: 106 private:
110 // Updates the speech webview and start page for the current |profile_|. 107 // Updates the speech webview and start page for the current |profile_|.
111 void SetUpSearchUI(); 108 void SetUpSearchUI();
112 109
113 // Updates the app list's ProfileMenuItems for the current |profile_|. 110 // Updates the app list's ProfileMenuItems for the current |profile_|.
114 void SetUpProfileSwitcher(); 111 void SetUpProfileSwitcher();
115 112
116 // Updates the app list's custom launcher pages for the current |profile_|. 113 // Updates the app list's custom launcher pages for the current |profile_|.
117 void SetUpCustomLauncherPages(); 114 void SetUpCustomLauncherPages();
118 115
119 // Overridden from app_list::StartPageObserver: 116 // Overridden from app_list::StartPageObserver:
120 virtual void OnSpeechResult(const base::string16& result, 117 void OnSpeechResult(const base::string16& result, bool is_final) override;
121 bool is_final) override; 118 void OnSpeechSoundLevelChanged(int16 level) override;
122 virtual void OnSpeechSoundLevelChanged(int16 level) override; 119 void OnSpeechRecognitionStateChanged(
123 virtual void OnSpeechRecognitionStateChanged(
124 app_list::SpeechRecognitionState new_state) override; 120 app_list::SpeechRecognitionState new_state) override;
125 121
126 // Overridden from HotwordClient: 122 // Overridden from HotwordClient:
127 virtual void OnHotwordStateChanged(bool started) override; 123 void OnHotwordStateChanged(bool started) override;
128 virtual void OnHotwordRecognized() override; 124 void OnHotwordRecognized() override;
129 125
130 // Overridden from SigninManagerFactory::Observer: 126 // Overridden from SigninManagerFactory::Observer:
131 virtual void SigninManagerCreated(SigninManagerBase* manager) override; 127 void SigninManagerCreated(SigninManagerBase* manager) override;
132 virtual void SigninManagerShutdown(SigninManagerBase* manager) override; 128 void SigninManagerShutdown(SigninManagerBase* manager) override;
133 129
134 // Overridden from SigninManagerBase::Observer: 130 // Overridden from SigninManagerBase::Observer:
135 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) override; 131 void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
136 virtual void GoogleSigninSucceeded(const std::string& account_id, 132 void GoogleSigninSucceeded(const std::string& account_id,
137 const std::string& username, 133 const std::string& username,
138 const std::string& password) override; 134 const std::string& password) override;
139 virtual void GoogleSignedOut(const std::string& account_id, 135 void GoogleSignedOut(const std::string& account_id,
140 const std::string& username) override; 136 const std::string& username) override;
141 137
142 // Overridden from ProfileInfoCacheObserver: 138 // Overridden from ProfileInfoCacheObserver:
143 virtual void OnProfileAdded(const base::FilePath& profile_path) override; 139 void OnProfileAdded(const base::FilePath& profile_path) override;
144 virtual void OnProfileWasRemoved(const base::FilePath& profile_path, 140 void OnProfileWasRemoved(const base::FilePath& profile_path,
145 const base::string16& profile_name) override; 141 const base::string16& profile_name) override;
146 virtual void OnProfileNameChanged( 142 void OnProfileNameChanged(const base::FilePath& profile_path,
147 const base::FilePath& profile_path, 143 const base::string16& old_profile_name) override;
148 const base::string16& old_profile_name) override;
149 144
150 // Overridden from content::NotificationObserver: 145 // Overridden from content::NotificationObserver:
151 virtual void Observe(int type, 146 void Observe(int type,
152 const content::NotificationSource& source, 147 const content::NotificationSource& source,
153 const content::NotificationDetails& details) override; 148 const content::NotificationDetails& details) override;
154 149
155 // Unowned pointer to the controller. 150 // Unowned pointer to the controller.
156 AppListControllerDelegate* controller_; 151 AppListControllerDelegate* controller_;
157 // Unowned pointer to the associated profile. May change if SetProfileByPath 152 // Unowned pointer to the associated profile. May change if SetProfileByPath
158 // is called. 153 // is called.
159 Profile* profile_; 154 Profile* profile_;
160 // Unowned pointer to the model owned by AppListSyncableService. Will change 155 // Unowned pointer to the model owned by AppListSyncableService. Will change
161 // if |profile_| changes. 156 // if |profile_| changes.
162 app_list::AppListModel* model_; 157 app_list::AppListModel* model_;
163 158
(...skipping 20 matching lines...) Expand all
184 // Window contents of additional custom launcher pages. 179 // Window contents of additional custom launcher pages.
185 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; 180 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_;
186 181
187 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. 182 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages.
188 content::NotificationRegistrar registrar_; 183 content::NotificationRegistrar registrar_;
189 184
190 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); 185 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate);
191 }; 186 };
192 187
193 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 188 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698