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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/app_list/app_list_export.h" | 10 #include "ui/app_list/app_list_export.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 class AppListItemModel; | 22 class AppListItemModel; |
23 class AppListModel; | 23 class AppListModel; |
24 class SearchResult; | 24 class SearchResult; |
25 class SigninDelegate; | 25 class SigninDelegate; |
26 | 26 |
27 class APP_LIST_EXPORT AppListViewDelegate { | 27 class APP_LIST_EXPORT AppListViewDelegate { |
28 public: | 28 public: |
29 // AppListView owns the delegate. | 29 // AppListView owns the delegate. |
30 virtual ~AppListViewDelegate() {} | 30 virtual ~AppListViewDelegate() {} |
31 | 31 |
32 // Invoked to set the model that AppListView uses. | 32 // Sets the delegate to use the profile at |profile_path|. |
33 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; | |
34 | |
35 // Invoked to initialize the model that AppListView uses. This binds the given | |
tapted
2013/08/05 03:01:39
Incomplete sentence: "This binds the given.."
calamity
2013/08/08 04:52:12
Done.
| |
33 // Note that AppListView owns the model. | 36 // Note that AppListView owns the model. |
34 virtual void SetModel(AppListModel* model) = 0; | 37 virtual void InitModel(AppListModel* model) = 0; |
35 | 38 |
36 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. | 39 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. |
37 virtual SigninDelegate* GetSigninDelegate() = 0; | 40 virtual SigninDelegate* GetSigninDelegate() = 0; |
38 | 41 |
39 // Gets a path to a shortcut for the given app. Returns asynchronously as the | 42 // Gets a path to a shortcut for the given app. Returns asynchronously as the |
40 // shortcut may not exist yet. | 43 // shortcut may not exist yet. |
41 virtual void GetShortcutPathForApp( | 44 virtual void GetShortcutPathForApp( |
42 const std::string& app_id, | 45 const std::string& app_id, |
43 const base::Callback<void(const base::FilePath&)>& callback) = 0; | 46 const base::Callback<void(const base::FilePath&)>& callback) = 0; |
44 | 47 |
(...skipping 24 matching lines...) Expand all Loading... | |
69 | 72 |
70 // Invoked when the app list is closing. | 73 // Invoked when the app list is closing. |
71 virtual void ViewClosing() = 0; | 74 virtual void ViewClosing() = 0; |
72 | 75 |
73 // Invoked when the app list's activated state changes. | 76 // Invoked when the app list's activated state changes. |
74 virtual void ViewActivationChanged(bool active) = 0; | 77 virtual void ViewActivationChanged(bool active) = 0; |
75 | 78 |
76 // Returns the icon to be displayed in the window and taskbar. | 79 // Returns the icon to be displayed in the window and taskbar. |
77 virtual gfx::ImageSkia GetWindowIcon() = 0; | 80 virtual gfx::ImageSkia GetWindowIcon() = 0; |
78 | 81 |
79 // Returns the name of the current user. | |
80 virtual base::string16 GetCurrentUserName() = 0; | |
81 | |
82 // Returns the email of the current user. | |
83 virtual base::string16 GetCurrentUserEmail() = 0; | |
84 | |
85 // Open the settings UI. | 82 // Open the settings UI. |
86 virtual void OpenSettings() = 0; | 83 virtual void OpenSettings() = 0; |
87 | 84 |
88 // Open the help UI. | 85 // Open the help UI. |
89 virtual void OpenHelp() = 0; | 86 virtual void OpenHelp() = 0; |
90 | 87 |
91 // Open the feedback UI. | 88 // Open the feedback UI. |
92 virtual void OpenFeedback() = 0; | 89 virtual void OpenFeedback() = 0; |
90 | |
91 // Shows the app list for the profile specified by |profile_path|. | |
92 virtual void ShowForProfileByPath(const base::FilePath& profile_path) = 0; | |
93 | |
94 // Sets the |model|'s current user to this delegate's profile and rebuilds the | |
tapted
2013/08/05 03:01:39
|model| has no meaning here -- perhaps refer to it
| |
95 // ProfileMenuItems in the given |model|. | |
96 virtual void UpdateModelWithCurrentProfiles() = 0; | |
tapted
2013/08/05 03:01:39
Probably shouldn't be plural Profiles. Maybe call
calamity
2013/08/08 04:52:12
Hmm. Plural is appropriate though because it also
| |
93 }; | 97 }; |
94 | 98 |
95 } // namespace app_list | 99 } // namespace app_list |
96 | 100 |
97 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 101 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |