| 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 |
| 36 // model to this AppListViewDelegate and makes the AppListViewDelegate |
| 37 // responsible for updating the model. |
| 33 // Note that AppListView owns the model. | 38 // Note that AppListView owns the model. |
| 34 virtual void SetModel(AppListModel* model) = 0; | 39 virtual void InitModel(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( |
| 42 const std::string& app_id, | 47 const std::string& app_id, |
| 43 const base::Callback<void(const base::FilePath&)>& callback) = 0; | 48 const base::Callback<void(const base::FilePath&)>& callback) = 0; |
| 44 | 49 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 74 virtual gfx::ImageSkia GetWindowIcon() = 0; | 79 virtual gfx::ImageSkia GetWindowIcon() = 0; |
| 75 | 80 |
| 76 // Open the settings UI. | 81 // Open the settings UI. |
| 77 virtual void OpenSettings() = 0; | 82 virtual void OpenSettings() = 0; |
| 78 | 83 |
| 79 // Open the help UI. | 84 // Open the help UI. |
| 80 virtual void OpenHelp() = 0; | 85 virtual void OpenHelp() = 0; |
| 81 | 86 |
| 82 // Open the feedback UI. | 87 // Open the feedback UI. |
| 83 virtual void OpenFeedback() = 0; | 88 virtual void OpenFeedback() = 0; |
| 89 |
| 90 // Shows the app list for the profile specified by |profile_path|. |
| 91 virtual void ShowForProfileByPath(const base::FilePath& profile_path) = 0; |
| 84 }; | 92 }; |
| 85 | 93 |
| 86 } // namespace app_list | 94 } // namespace app_list |
| 87 | 95 |
| 88 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 96 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| OLD | NEW |