Views Omnibox: tolerate minor click-to-select-all dragging.
[chromium-blink-merge.git] / ui / app_list / views / apps_grid_view_delegate.h
blob14b31a063c8cdcb7c3242bec6fdeffd304adde19
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.
5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_
6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_
8 #include <string>
10 #include "base/callback_forward.h"
11 #include "ui/app_list/app_list_export.h"
13 namespace base {
14 class FilePath;
17 namespace app_list {
19 class AppListItem;
21 class APP_LIST_EXPORT AppsGridViewDelegate {
22 public:
23 // Invoked when an item is activated on the grid view. |event_flags| contains
24 // the flags of the keyboard/mouse event that triggers the activation request.
25 virtual void ActivateApp(AppListItem* item, int event_flags) = 0;
27 // Gets the path to a shortcut for the app represented by |item|. |callback|
28 // may be run immediately.
29 virtual void GetShortcutPathForApp(
30 const std::string& app_id,
31 const base::Callback<void(const base::FilePath&)>& callback) = 0;
33 protected:
34 virtual ~AppsGridViewDelegate() {}
37 } // namespace app_list
39 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_DELEGATE_H_