| 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 "ui/app_list/app_list_export.h" | 8 #include "ui/app_list/app_list_export.h" |
| 9 | 9 |
| 10 namespace app_list { | 10 namespace app_list { |
| 11 | 11 |
| 12 class AppListItemModel; | 12 class AppListItemModel; |
| 13 class AppListModel; | 13 class AppListModel; |
| 14 class SearchResult; | 14 class SearchResult; |
| 15 class SigninDelegate; | |
| 16 | 15 |
| 17 class APP_LIST_EXPORT AppListViewDelegate { | 16 class APP_LIST_EXPORT AppListViewDelegate { |
| 18 public: | 17 public: |
| 19 // AppListView owns the delegate. | 18 // AppListView owns the delegate. |
| 20 virtual ~AppListViewDelegate() {} | 19 virtual ~AppListViewDelegate() {} |
| 21 | 20 |
| 22 // Invoked to set the model that AppListView uses. | 21 // Invoked to set the model that AppListView uses. |
| 23 // Note that AppListView owns the model. | 22 // Note that AppListView owns the model. |
| 24 virtual void SetModel(AppListModel* model) = 0; | 23 virtual void SetModel(AppListModel* model) = 0; |
| 25 | 24 |
| 26 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate. | |
| 27 virtual SigninDelegate* GetSigninDelegate() = 0; | |
| 28 | |
| 29 // Invoked when an AppListeItemModelView is activated by click or enter key. | 25 // Invoked when an AppListeItemModelView is activated by click or enter key. |
| 30 virtual void ActivateAppListItem(AppListItemModel* item, | 26 virtual void ActivateAppListItem(AppListItemModel* item, |
| 31 int event_flags) = 0; | 27 int event_flags) = 0; |
| 32 | 28 |
| 33 // Invoked to start a new search. Delegate collects query input from | 29 // Invoked to start a new search. Delegate collects query input from |
| 34 // SearchBoxModel and populates SearchResults. Both models are sub models | 30 // SearchBoxModel and populates SearchResults. Both models are sub models |
| 35 // of AppListModel. | 31 // of AppListModel. |
| 36 virtual void StartSearch() = 0; | 32 virtual void StartSearch() = 0; |
| 37 | 33 |
| 38 // Invoked to stop the current search. | 34 // Invoked to stop the current search. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 55 // Invoked when the app list is closing. | 51 // Invoked when the app list is closing. |
| 56 virtual void ViewClosing() = 0; | 52 virtual void ViewClosing() = 0; |
| 57 | 53 |
| 58 // Invoked when the app list's activated state changes. | 54 // Invoked when the app list's activated state changes. |
| 59 virtual void ViewActivationChanged(bool active) = 0; | 55 virtual void ViewActivationChanged(bool active) = 0; |
| 60 }; | 56 }; |
| 61 | 57 |
| 62 } // namespace app_list | 58 } // namespace app_list |
| 63 | 59 |
| 64 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 60 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| OLD | NEW |