Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: chrome/browser/ui/app_list/app_list_controller_delegate.h

Issue 2787693002: Remove more dead app list code. (Closed)
Patch Set: updated comment Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/common/extensions/extension_constants.h" 10 #include "chrome/common/extensions/extension_constants.h"
11 #include "extensions/common/constants.h" 11 #include "extensions/common/constants.h"
12 #include "ui/base/page_transition_types.h" 12 #include "ui/base/page_transition_types.h"
13 #include "ui/base/window_open_disposition.h" 13 #include "ui/base/window_open_disposition.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace base {
19 class FilePath;
20 }
21
22 namespace extensions { 18 namespace extensions {
23 class Extension; 19 class Extension;
24 class ExtensionSet; 20 class ExtensionSet;
25 class InstallTracker; 21 class InstallTracker;
26 } 22 }
27 23
28 namespace gfx { 24 namespace gfx {
29 class Rect; 25 class Rect;
30 } 26 }
31 27
(...skipping 12 matching lines...) Expand all
44 // Whether apps can be pinned, and whether pinned apps are editable or fixed. 40 // Whether apps can be pinned, and whether pinned apps are editable or fixed.
45 // TODO(khmel): Find better home for Pinnable enum. 41 // TODO(khmel): Find better home for Pinnable enum.
46 enum Pinnable { 42 enum Pinnable {
47 NO_PIN, 43 NO_PIN,
48 PIN_EDITABLE, 44 PIN_EDITABLE,
49 PIN_FIXED 45 PIN_FIXED
50 }; 46 };
51 47
52 virtual ~AppListControllerDelegate(); 48 virtual ~AppListControllerDelegate();
53 49
54 // Whether to force the use of a native desktop widget when the app list
55 // window is first created.
56 virtual bool ForceNativeDesktop() const;
57
58 // Dismisses the view. 50 // Dismisses the view.
59 virtual void DismissView() = 0; 51 virtual void DismissView() = 0;
60 52
61 // Handle the view being closed. 53 // Handle the view being closed.
62 virtual void ViewClosing(); 54 virtual void ViewClosing();
63 55
64 // Get app list window. 56 // Get app list window.
65 virtual gfx::NativeWindow GetAppListWindow() = 0; 57 virtual gfx::NativeWindow GetAppListWindow() = 0;
66 58
67 // Get the content bounds of the app list in the screen. On platforms that 59 // Get the content bounds of the app list in the screen. On platforms that
68 // use views, this returns the bounds of the AppListView. Without views, this 60 // use views, this returns the bounds of the AppListView. Without views, this
69 // returns a 0x0 rectangle. 61 // returns a 0x0 rectangle.
70 virtual gfx::Rect GetAppListBounds(); 62 virtual gfx::Rect GetAppListBounds();
71 63
72 // Control of pinning apps. 64 // Control of pinning apps.
73 virtual bool IsAppPinned(const std::string& app_id) = 0; 65 virtual bool IsAppPinned(const std::string& app_id) = 0;
74 virtual void PinApp(const std::string& app_id) = 0; 66 virtual void PinApp(const std::string& app_id) = 0;
75 virtual void UnpinApp(const std::string& app_id) = 0; 67 virtual void UnpinApp(const std::string& app_id) = 0;
76 virtual Pinnable GetPinnable(const std::string& app_id) = 0; 68 virtual Pinnable GetPinnable(const std::string& app_id) = 0;
77 69
78 // Returns true if requested app is open. 70 // Returns true if requested app is open.
79 virtual bool IsAppOpen(const std::string& app_id) const = 0; 71 virtual bool IsAppOpen(const std::string& app_id) const = 0;
80 72
81 // Called before and after a dialog opens in the app list. For example, 73 // Called before and after a dialog opens in the app list. For example,
82 // displays an overlay that disables the app list while the dialog is open. 74 // displays an overlay that disables the app list while the dialog is open.
83 virtual void OnShowChildDialog(); 75 virtual void OnShowChildDialog();
84 virtual void OnCloseChildDialog(); 76 virtual void OnCloseChildDialog();
85 77
86 // Whether the controller supports a Create Shortcuts flow.
87 virtual bool CanDoCreateShortcutsFlow() = 0;
88
89 // Show the dialog to create shortcuts. Call only if
90 // CanDoCreateShortcutsFlow() returns true.
91 virtual void DoCreateShortcutsFlow(Profile* profile,
92 const std::string& extension_id) = 0;
93
94 // Whether the controller supports a Show App Info flow. 78 // Whether the controller supports a Show App Info flow.
95 virtual bool CanDoShowAppInfoFlow(); 79 virtual bool CanDoShowAppInfoFlow();
96 80
97 // Show the dialog with the application's information. Call only if 81 // Show the dialog with the application's information. Call only if
98 // CanDoShowAppInfoFlow() returns true. 82 // CanDoShowAppInfoFlow() returns true.
99 virtual void DoShowAppInfoFlow(Profile* profile, 83 virtual void DoShowAppInfoFlow(Profile* profile,
100 const std::string& extension_id); 84 const std::string& extension_id);
101 85
102 // Handle the "create window" context menu items of Chrome App. 86 // Handle the "create window" context menu items of Chrome App.
103 // |incognito| is true to create an incognito window. 87 // |incognito| is true to create an incognito window.
(...skipping 10 matching lines...) Expand all
114 const extensions::Extension* extension, 98 const extensions::Extension* extension,
115 AppListSource source, 99 AppListSource source,
116 int event_flags) = 0; 100 int event_flags) = 0;
117 101
118 // Launch the app. 102 // Launch the app.
119 virtual void LaunchApp(Profile* profile, 103 virtual void LaunchApp(Profile* profile,
120 const extensions::Extension* extension, 104 const extensions::Extension* extension,
121 AppListSource source, 105 AppListSource source,
122 int event_flags) = 0; 106 int event_flags) = 0;
123 107
124 // Show the app list for the profile specified by |profile_path|.
125 virtual void ShowForProfileByPath(const base::FilePath& profile_path) = 0;
126
127 // Whether or not the icon indicating which user is logged in should be
128 // visible.
129 virtual bool ShouldShowUserIcon() = 0;
130
131 static std::string AppListSourceToString(AppListSource source); 108 static std::string AppListSourceToString(AppListSource source);
132 109
133 // True if the user has permission to modify the given app's settings. 110 // True if the user has permission to modify the given app's settings.
134 bool UserMayModifySettings(Profile* profile, const std::string& app_id); 111 bool UserMayModifySettings(Profile* profile, const std::string& app_id);
135 112
136 // Uninstall the app identified by |app_id| from |profile|. 113 // Uninstall the app identified by |app_id| from |profile|.
137 void UninstallApp(Profile* profile, const std::string& app_id); 114 void UninstallApp(Profile* profile, const std::string& app_id);
138 115
139 // True if the app was installed from the web store. 116 // True if the app was installed from the web store.
140 bool IsAppFromWebStore(Profile* profile, 117 bool IsAppFromWebStore(Profile* profile,
(...skipping 27 matching lines...) Expand all
168 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile); 145 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile);
169 146
170 // Get the list of installed apps for the given profile. 147 // Get the list of installed apps for the given profile.
171 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps); 148 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps);
172 149
173 // Called when a search is started using the app list search box. 150 // Called when a search is started using the app list search box.
174 void OnSearchStarted(); 151 void OnSearchStarted();
175 }; 152 };
176 153
177 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ 154 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_context_menu_unittest.cc ('k') | chrome/browser/ui/app_list/app_list_controller_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698