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

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

Issue 276833002: Make the App Info Dialog appear modal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary mac fixes Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_controller_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 namespace base { 15 namespace base {
16 class FilePath; 16 class FilePath;
17 } 17 }
18 18
19 namespace extensions { 19 namespace extensions {
20 class Extension; 20 class Extension;
21 class ExtensionSet; 21 class ExtensionSet;
22 class InstallTracker; 22 class InstallTracker;
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class ImageSkia; 26 class ImageSkia;
27 class Rect;
27 } 28 }
28 29
29 // Interface to allow the view delegate to call out to whatever is controlling 30 // Interface to allow the view delegate to call out to whatever is controlling
30 // the app list. This will have different implementations for different 31 // the app list. This will have different implementations for different
31 // platforms. 32 // platforms.
32 class AppListControllerDelegate { 33 class AppListControllerDelegate {
33 public: 34 public:
34 // Indicates the source of an app list activation, for tracking purposes. 35 // Indicates the source of an app list activation, for tracking purposes.
35 enum AppListSource { 36 enum AppListSource {
36 LAUNCH_FROM_UNKNOWN, 37 LAUNCH_FROM_UNKNOWN,
(...skipping 16 matching lines...) Expand all
53 54
54 // Dismisses the view. 55 // Dismisses the view.
55 virtual void DismissView() = 0; 56 virtual void DismissView() = 0;
56 57
57 // Handle the view being closed. 58 // Handle the view being closed.
58 virtual void ViewClosing(); 59 virtual void ViewClosing();
59 60
60 // Get app list window. 61 // Get app list window.
61 virtual gfx::NativeWindow GetAppListWindow() = 0; 62 virtual gfx::NativeWindow GetAppListWindow() = 0;
62 63
64 // Get the content bounds of the app list in the screen. On platforms that
65 // use views, this returns the bounds of the AppListView. Without views, this
66 // returns a 0x0 rectangle.
67 virtual gfx::Rect GetAppListBounds();
68
63 // Get the application icon to be used, if any, for the app list. 69 // Get the application icon to be used, if any, for the app list.
64 virtual gfx::ImageSkia GetWindowIcon() = 0; 70 virtual gfx::ImageSkia GetWindowIcon() = 0;
65 71
66 // Control of pinning apps. 72 // Control of pinning apps.
67 virtual bool IsAppPinned(const std::string& extension_id) = 0; 73 virtual bool IsAppPinned(const std::string& extension_id) = 0;
68 virtual void PinApp(const std::string& extension_id) = 0; 74 virtual void PinApp(const std::string& extension_id) = 0;
69 virtual void UnpinApp(const std::string& extension_id) = 0; 75 virtual void UnpinApp(const std::string& extension_id) = 0;
70 virtual Pinnable GetPinnable() = 0; 76 virtual Pinnable GetPinnable() = 0;
71 77
72 // Be aware of the extension prompt (either uninstalling flow or enable flow). 78 // Called before and after a dialog opens in the app list. For example,
73 virtual void OnShowExtensionPrompt(); 79 // displays an overlay that disables the app list while the dialog is open.
74 virtual void OnCloseExtensionPrompt(); 80 virtual void OnShowChildDialog();
81 virtual void OnCloseChildDialog();
75 82
76 // Whether the controller supports a Create Shortcuts flow. 83 // Whether the controller supports a Create Shortcuts flow.
77 virtual bool CanDoCreateShortcutsFlow() = 0; 84 virtual bool CanDoCreateShortcutsFlow() = 0;
78 85
79 // Show the dialog to create shortcuts. Call only if 86 // Show the dialog to create shortcuts. Call only if
80 // CanDoCreateShortcutsFlow() returns true. 87 // CanDoCreateShortcutsFlow() returns true.
81 virtual void DoCreateShortcutsFlow(Profile* profile, 88 virtual void DoCreateShortcutsFlow(Profile* profile,
82 const std::string& extension_id) = 0; 89 const std::string& extension_id) = 0;
83 90
84 // Whether the controller supports a Show App Info flow. 91 // Whether the controller supports a Show App Info flow.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile); 158 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile);
152 159
153 // Get the list of installed apps for the given profile. 160 // Get the list of installed apps for the given profile.
154 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps); 161 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps);
155 162
156 // Called when a search is started using the app list search box. 163 // Called when a search is started using the app list search box.
157 void OnSearchStarted(); 164 void OnSearchStarted();
158 }; 165 };
159 166
160 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ 167 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | 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