OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 5 #ifndef ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
6 #define ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 6 #define ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <string> |
| 10 |
9 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
10 | 12 |
11 namespace ash { | 13 namespace ash { |
12 | 14 |
13 class AppListItemModel; | 15 class AppListItemModel; |
| 16 class AppListModel; |
14 | 17 |
15 class ASH_EXPORT AppListViewDelegate { | 18 class ASH_EXPORT AppListViewDelegate { |
16 public: | 19 public: |
17 // AppListView owns the delegate. | 20 // AppListView owns the delegate. |
18 virtual ~AppListViewDelegate() {} | 21 virtual ~AppListViewDelegate() {} |
19 | 22 |
| 23 // Invoked to ask the delegate to populate the |model| for given |query|. |
| 24 virtual void BuildAppListModel(const std::string& query, |
| 25 AppListModel* model) = 0; |
| 26 |
20 // Invoked an AppListeItemModelView is activated by click or enter key. | 27 // Invoked an AppListeItemModelView is activated by click or enter key. |
21 virtual void OnAppListItemActivated(AppListItemModel* item, | 28 virtual void OnAppListItemActivated(AppListItemModel* item, |
22 int event_flags) = 0; | 29 int event_flags) = 0; |
23 }; | 30 }; |
24 | 31 |
25 } // namespace ash | 32 } // namespace ash |
26 | 33 |
27 #endif // ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 34 #endif // ASH_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |