| 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|. |callback| |
| 26 // may be run immediately. |
| 27 virtual void GetShortcutPathForApp( |
| 28 const std::string& app_id, |
| 29 const base::Callback<void(const base::FilePath&)>& callback) = 0; |
| 30 |
| 20 protected: | 31 protected: |
| 21 virtual ~AppsGridViewDelegate() {} | 32 virtual ~AppsGridViewDelegate() {} |
| 22 }; | 33 }; |
| 23 | 34 |
| 24 } // namespace app_list | 35 } // namespace app_list |
| 25 | 36 |
| 26 #endif // UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ | 37 #endif // UI_APP_LIST_APPS_GRID_VIEW_DELEGATE_H_ |
| OLD | NEW |