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 13 matching lines...) Expand all Loading... |
24 namespace gfx { | 24 namespace gfx { |
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 SearchResult; | 32 class SearchResult; |
33 class SigninDelegate; | 33 class SigninDelegate; |
| 34 class SpeechUIModel; |
34 | 35 |
35 class APP_LIST_EXPORT AppListViewDelegate { | 36 class APP_LIST_EXPORT AppListViewDelegate { |
36 public: | 37 public: |
37 // A user of the app list. | 38 // A user of the app list. |
38 struct APP_LIST_EXPORT User { | 39 struct APP_LIST_EXPORT User { |
39 User(); | 40 User(); |
40 ~User(); | 41 ~User(); |
41 | 42 |
42 // Whether or not this user is the current user of the app list. | 43 // Whether or not this user is the current user of the app list. |
43 bool active; | 44 bool active; |
(...skipping 20 matching lines...) Expand all Loading... |
64 // only used by non-Ash Windows. | 65 // only used by non-Ash Windows. |
65 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; | 66 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; |
66 | 67 |
67 // Gets the model associated with the view delegate. The model may be owned | 68 // Gets the model associated with the view delegate. The model may be owned |
68 // by the delegate, or owned elsewhere (e.g. a profile keyed service). | 69 // by the delegate, or owned elsewhere (e.g. a profile keyed service). |
69 virtual AppListModel* GetModel() = 0; | 70 virtual AppListModel* GetModel() = 0; |
70 | 71 |
71 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. | 72 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. |
72 virtual SigninDelegate* GetSigninDelegate() = 0; | 73 virtual SigninDelegate* GetSigninDelegate() = 0; |
73 | 74 |
| 75 // Gets the SpeechUIModel for the app list. Owned by the AppListViewDelegate. |
| 76 virtual SpeechUIModel* GetSpeechUI() = 0; |
| 77 |
74 // Gets a path to a shortcut for the given app. Returns asynchronously as the | 78 // Gets a path to a shortcut for the given app. Returns asynchronously as the |
75 // shortcut may not exist yet. | 79 // shortcut may not exist yet. |
76 virtual void GetShortcutPathForApp( | 80 virtual void GetShortcutPathForApp( |
77 const std::string& app_id, | 81 const std::string& app_id, |
78 const base::Callback<void(const base::FilePath&)>& callback) = 0; | 82 const base::Callback<void(const base::FilePath&)>& callback) = 0; |
79 | 83 |
80 // Invoked to start a new search. Delegate collects query input from | 84 // Invoked to start a new search. Delegate collects query input from |
81 // SearchBoxModel and populates SearchResults. Both models are sub models | 85 // SearchBoxModel and populates SearchResults. Both models are sub models |
82 // of AppListModel. | 86 // of AppListModel. |
83 virtual void StartSearch() = 0; | 87 virtual void StartSearch() = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Get the start page web contents. Owned by the AppListViewDelegate. | 126 // Get the start page web contents. Owned by the AppListViewDelegate. |
123 virtual content::WebContents* GetStartPageContents() = 0; | 127 virtual content::WebContents* GetStartPageContents() = 0; |
124 | 128 |
125 // Returns the list of users (for AppListMenu). | 129 // Returns the list of users (for AppListMenu). |
126 virtual const Users& GetUsers() const = 0; | 130 virtual const Users& GetUsers() const = 0; |
127 }; | 131 }; |
128 | 132 |
129 } // namespace app_list | 133 } // namespace app_list |
130 | 134 |
131 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 135 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |