gpu: Tweak Android WebGL test expectations
[chromium-blink-merge.git] / ui / app_list / app_list_view_delegate.h
blobbd7e3d3837f75193f4d69cffe578b1c006a48ef5
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
3 // found in the LICENSE file.
5 #ifndef UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
6 #define UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
8 #include "base/callback_forward.h"
9 #include "base/strings/string16.h"
10 #include "ui/app_list/app_list_export.h"
12 namespace base {
13 class FilePath;
16 namespace gfx {
17 class ImageSkia;
20 namespace app_list {
22 class AppListItemModel;
23 class AppListModel;
24 class SearchResult;
25 class SigninDelegate;
27 class APP_LIST_EXPORT AppListViewDelegate {
28 public:
29 // AppListView owns the delegate.
30 virtual ~AppListViewDelegate() {}
32 // Invoked to set the model that AppListView uses.
33 // Note that AppListView owns the model.
34 virtual void SetModel(AppListModel* model) = 0;
36 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate.
37 virtual SigninDelegate* GetSigninDelegate() = 0;
39 // Gets a path to a shortcut for the given app. Returns asynchronously as the
40 // shortcut may not exist yet.
41 virtual void GetShortcutPathForApp(
42 const std::string& app_id,
43 const base::Callback<void(const base::FilePath&)>& callback) = 0;
45 // Invoked when an AppListeItemModelView is activated by click or enter key.
46 virtual void ActivateAppListItem(AppListItemModel* item,
47 int event_flags) = 0;
49 // Invoked to start a new search. Delegate collects query input from
50 // SearchBoxModel and populates SearchResults. Both models are sub models
51 // of AppListModel.
52 virtual void StartSearch() = 0;
54 // Invoked to stop the current search.
55 virtual void StopSearch() = 0;
57 // Invoked to open the search result.
58 virtual void OpenSearchResult(SearchResult* result, int event_flags) = 0;
60 // Called to invoke a custom action on |result|. |action_index| corresponds
61 // to the index of an icon in |result.action_icons()|.
62 virtual void InvokeSearchResultAction(SearchResult* result,
63 int action_index,
64 int event_flags) = 0;
66 // Invoked to dismiss app list. This may leave the view open but hidden from
67 // the user.
68 virtual void Dismiss() = 0;
70 // Invoked when the app list is closing.
71 virtual void ViewClosing() = 0;
73 // Invoked when the app list's activated state changes.
74 virtual void ViewActivationChanged(bool active) = 0;
76 // Returns the icon to be displayed in the window and taskbar.
77 virtual gfx::ImageSkia GetWindowIcon() = 0;
79 // Returns the name of the current user.
80 virtual base::string16 GetCurrentUserName() = 0;
82 // Returns the email of the current user.
83 virtual base::string16 GetCurrentUserEmail() = 0;
85 // Open the settings UI.
86 virtual void OpenSettings() = 0;
88 // Open the help UI.
89 virtual void OpenHelp() = 0;
91 // Open the feedback UI.
92 virtual void OpenFeedback() = 0;
95 } // namespace app_list
97 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_