| OLD | NEW |
| 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 UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| 6 #define UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 6 #define UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class ImageSkia; | 25 class ImageSkia; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace app_list { | 28 namespace app_list { |
| 29 | 29 |
| 30 class AppListItemModel; | 30 class AppListItemModel; |
| 31 class AppListModel; | 31 class AppListModel; |
| 32 class AppListViewDelegateObserver; | 32 class AppListViewDelegateObserver; |
| 33 class SearchResult; | 33 class SearchResult; |
| 34 class SigninDelegate; | 34 class SigninDelegate; |
| 35 class SpeechUIModel; |
| 35 | 36 |
| 36 class APP_LIST_EXPORT AppListViewDelegate { | 37 class APP_LIST_EXPORT AppListViewDelegate { |
| 37 public: | 38 public: |
| 38 // A user of the app list. | 39 // A user of the app list. |
| 39 struct APP_LIST_EXPORT User { | 40 struct APP_LIST_EXPORT User { |
| 40 User(); | 41 User(); |
| 41 ~User(); | 42 ~User(); |
| 42 | 43 |
| 43 // Whether or not this user is the current user of the app list. | 44 // Whether or not this user is the current user of the app list. |
| 44 bool active; | 45 bool active; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 // only used by non-Ash Windows. | 66 // only used by non-Ash Windows. |
| 66 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; | 67 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; |
| 67 | 68 |
| 68 // Gets the model associated with the view delegate. The model may be owned | 69 // Gets the model associated with the view delegate. The model may be owned |
| 69 // by the delegate, or owned elsewhere (e.g. a profile keyed service). | 70 // by the delegate, or owned elsewhere (e.g. a profile keyed service). |
| 70 virtual AppListModel* GetModel() = 0; | 71 virtual AppListModel* GetModel() = 0; |
| 71 | 72 |
| 72 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. | 73 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. |
| 73 virtual SigninDelegate* GetSigninDelegate() = 0; | 74 virtual SigninDelegate* GetSigninDelegate() = 0; |
| 74 | 75 |
| 76 // Gets the SpeechUIModel for the app list. Owned by the AppListViewDelegate. |
| 77 virtual SpeechUIModel* GetSpeechUI() = 0; |
| 78 |
| 75 // Gets a path to a shortcut for the given app. Returns asynchronously as the | 79 // Gets a path to a shortcut for the given app. Returns asynchronously as the |
| 76 // shortcut may not exist yet. | 80 // shortcut may not exist yet. |
| 77 virtual void GetShortcutPathForApp( | 81 virtual void GetShortcutPathForApp( |
| 78 const std::string& app_id, | 82 const std::string& app_id, |
| 79 const base::Callback<void(const base::FilePath&)>& callback) = 0; | 83 const base::Callback<void(const base::FilePath&)>& callback) = 0; |
| 80 | 84 |
| 81 // Invoked to start a new search. Delegate collects query input from | 85 // Invoked to start a new search. Delegate collects query input from |
| 82 // SearchBoxModel and populates SearchResults. Both models are sub models | 86 // SearchBoxModel and populates SearchResults. Both models are sub models |
| 83 // of AppListModel. | 87 // of AppListModel. |
| 84 virtual void StartSearch() = 0; | 88 virtual void StartSearch() = 0; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 virtual const Users& GetUsers() const = 0; | 131 virtual const Users& GetUsers() const = 0; |
| 128 | 132 |
| 129 // Adds/removes an observer for profile changes. | 133 // Adds/removes an observer for profile changes. |
| 130 virtual void AddObserver(AppListViewDelegateObserver* observer) {} | 134 virtual void AddObserver(AppListViewDelegateObserver* observer) {} |
| 131 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} | 135 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 } // namespace app_list | 138 } // namespace app_list |
| 135 | 139 |
| 136 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 140 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| OLD | NEW |