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_APPS_GRID_VIEW_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ |
6 #define UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ | 6 #define UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | |
8 #include "ui/app_list/app_list_export.h" | 9 #include "ui/app_list/app_list_export.h" |
9 | 10 |
11 namespace base { | |
12 class FilePath; | |
13 } | |
14 | |
10 namespace app_list { | 15 namespace app_list { |
11 | 16 |
12 class AppListItemModel; | 17 class AppListItemModel; |
13 | 18 |
14 class APP_LIST_EXPORT AppsGridViewDelegate { | 19 class APP_LIST_EXPORT AppsGridViewDelegate { |
15 public: | 20 public: |
16 // Invoked when an item is activated on the grid view. |event_flags| contains | 21 // Invoked when an item is activated on the grid view. |event_flags| contains |
17 // the flags of the keyboard/mouse event that triggers the activation request. | 22 // the flags of the keyboard/mouse event that triggers the activation request. |
18 virtual void ActivateApp(AppListItemModel* item, int event_flags) = 0; | 23 virtual void ActivateApp(AppListItemModel* item, int event_flags) = 0; |
19 | 24 |
25 // Gets the path to a shortcut for the app represented by |item|. | |
sky
2013/06/19 14:07:40
Document that |callback| may be run immediately.
koz (OOO until 15th September)
2013/06/20 13:52:23
Done.
| |
26 virtual void GetShortcutPathForApp( | |
27 const std::string& app_id, | |
28 base::Callback<void(const base::FilePath&)> callback) = 0; | |
sky
2013/06/19 14:07:40
const Callback& ?
koz (OOO until 15th September)
2013/06/20 13:52:23
Done.
| |
29 | |
20 protected: | 30 protected: |
21 virtual ~AppsGridViewDelegate() {} | 31 virtual ~AppsGridViewDelegate() {} |
22 }; | 32 }; |
23 | 33 |
24 } // namespace app_list | 34 } // namespace app_list |
25 | 35 |
26 #endif // UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ | 36 #endif // UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ |
OLD | NEW |