- add sources.
[platform/framework/web/crosswalk.git] / src / ui / app_list / views / apps_grid_view_delegate.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_
6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_
7
8 #include "base/callback_forward.h"
9 #include "ui/app_list/app_list_export.h"
10
11 namespace base {
12 class FilePath;
13 }
14
15 namespace app_list {
16
17 class AppListItemModel;
18
19 class APP_LIST_EXPORT AppsGridViewDelegate {
20  public:
21   // Invoked when an item is activated on the grid view. |event_flags| contains
22   // the flags of the keyboard/mouse event that triggers the activation request.
23   virtual void ActivateApp(AppListItemModel* item, int event_flags) = 0;
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
31  protected:
32   virtual ~AppsGridViewDelegate() {}
33 };
34
35 }  // namespace app_list
36
37 #endif  // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_