Chromium Code Reviews| 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" |
| 11 | 11 |
| 12 struct AvatarMenuItemModel; | |
| 13 class Profile; | |
|
tapted
2013/07/31 05:43:53
src/ui shouldn't care about Profile* - I don't thi
calamity
2013/08/01 08:35:45
Done.
| |
| 14 | |
| 12 namespace base { | 15 namespace base { |
| 13 class FilePath; | 16 class FilePath; |
| 14 } | 17 } |
| 15 | 18 |
| 16 namespace gfx { | 19 namespace gfx { |
| 17 class ImageSkia; | 20 class ImageSkia; |
| 18 } | 21 } |
| 19 | 22 |
| 20 namespace app_list { | 23 namespace app_list { |
| 21 | 24 |
| 22 class AppListItemModel; | 25 class AppListItemModel; |
| 23 class AppListModel; | 26 class AppListModel; |
| 24 class SearchResult; | 27 class SearchResult; |
| 25 class SigninDelegate; | 28 class SigninDelegate; |
| 26 | 29 |
| 27 class APP_LIST_EXPORT AppListViewDelegate { | 30 class APP_LIST_EXPORT AppListViewDelegate { |
| 28 public: | 31 public: |
| 29 // AppListView owns the delegate. | 32 // AppListView owns the delegate. |
| 30 virtual ~AppListViewDelegate() {} | 33 virtual ~AppListViewDelegate() {} |
| 31 | 34 |
| 35 virtual void SetProfile(Profile* profile) = 0; | |
|
benwells
2013/07/31 05:47:13
I don't think we want to add profile here. Do you
calamity
2013/08/01 08:35:45
Done.
| |
| 36 | |
| 32 // Invoked to set the model that AppListView uses. | 37 // Invoked to set the model that AppListView uses. |
| 33 // Note that AppListView owns the model. | 38 // Note that AppListView owns the model. |
| 34 virtual void SetModel(AppListModel* model) = 0; | 39 virtual void SetModel(AppListModel* model) = 0; |
| 35 | 40 |
| 36 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. | 41 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. |
| 37 virtual SigninDelegate* GetSigninDelegate() = 0; | 42 virtual SigninDelegate* GetSigninDelegate() = 0; |
| 38 | 43 |
| 39 // Gets a path to a shortcut for the given app. Returns asynchronously as the | 44 // Gets a path to a shortcut for the given app. Returns asynchronously as the |
| 40 // shortcut may not exist yet. | 45 // shortcut may not exist yet. |
| 41 virtual void GetShortcutPathForApp( | 46 virtual void GetShortcutPathForApp( |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 69 | 74 |
| 70 // Invoked when the app list is closing. | 75 // Invoked when the app list is closing. |
| 71 virtual void ViewClosing() = 0; | 76 virtual void ViewClosing() = 0; |
| 72 | 77 |
| 73 // Invoked when the app list's activated state changes. | 78 // Invoked when the app list's activated state changes. |
| 74 virtual void ViewActivationChanged(bool active) = 0; | 79 virtual void ViewActivationChanged(bool active) = 0; |
| 75 | 80 |
| 76 // Returns the icon to be displayed in the window and taskbar. | 81 // Returns the icon to be displayed in the window and taskbar. |
| 77 virtual gfx::ImageSkia GetWindowIcon() = 0; | 82 virtual gfx::ImageSkia GetWindowIcon() = 0; |
| 78 | 83 |
| 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. | 84 // Open the settings UI. |
| 86 virtual void OpenSettings() = 0; | 85 virtual void OpenSettings() = 0; |
| 87 | 86 |
| 88 // Open the help UI. | 87 // Open the help UI. |
| 89 virtual void OpenHelp() = 0; | 88 virtual void OpenHelp() = 0; |
| 90 | 89 |
| 91 // Open the feedback UI. | 90 // Open the feedback UI. |
| 92 virtual void OpenFeedback() = 0; | 91 virtual void OpenFeedback() = 0; |
| 92 | |
| 93 // Shows the app list for the profile at position |index| in the | |
| 94 // ProfileInfoCache. | |
|
benwells
2013/07/31 05:47:13
ProfileInfoCache is a chrome concept. Having index
calamity
2013/08/01 08:35:45
Done.
| |
| 95 virtual void ShowForProfileAtIndex(size_t index) = 0; | |
| 96 | |
| 97 // Rebuilds the avatar menu items from the profile info cache. | |
|
benwells
2013/07/31 05:47:13
Again, profile info cache is a chrome concept and
calamity
2013/08/01 08:35:45
Done.
| |
| 98 virtual void RebuildAvatarMenuItems(app_list::AppListModel* model) = 0; | |
| 93 }; | 99 }; |
| 94 | 100 |
| 95 } // namespace app_list | 101 } // namespace app_list |
| 96 | 102 |
| 97 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 103 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| OLD | NEW |