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

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

Issue 719203003: Parent the AppInfoDialog using a ModalDialogHost Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 { 18 namespace base {
19 class FilePath; 19 class FilePath;
20 } 20 }
21 21
22 namespace extensions { 22 namespace extensions {
23 class Extension; 23 class Extension;
24 class ExtensionSet; 24 class ExtensionSet;
25 class InstallTracker; 25 class InstallTracker;
26 } 26 }
27 27
28 namespace gfx { 28 namespace gfx {
29 class ImageSkia; 29 class ImageSkia;
30 class Rect; 30 class Size;
31 }
32
33 namespace web_modal {
34 class ModalDialogHost;
31 } 35 }
32 36
33 // Interface to allow the view delegate to call out to whatever is controlling 37 // Interface to allow the view delegate to call out to whatever is controlling
34 // the app list. This will have different implementations for different 38 // the app list. This will have different implementations for different
35 // platforms. 39 // platforms.
36 class AppListControllerDelegate { 40 class AppListControllerDelegate {
37 public: 41 public:
38 // Indicates the source of an app list activation, for tracking purposes. 42 // Indicates the source of an app list activation, for tracking purposes.
39 enum AppListSource { 43 enum AppListSource {
40 LAUNCH_FROM_UNKNOWN, 44 LAUNCH_FROM_UNKNOWN,
(...skipping 16 matching lines...) Expand all
57 61
58 // Dismisses the view. 62 // Dismisses the view.
59 virtual void DismissView() = 0; 63 virtual void DismissView() = 0;
60 64
61 // Handle the view being closed. 65 // Handle the view being closed.
62 virtual void ViewClosing(); 66 virtual void ViewClosing();
63 67
64 // Get app list window. 68 // Get app list window.
65 virtual gfx::NativeWindow GetAppListWindow() = 0; 69 virtual gfx::NativeWindow GetAppListWindow() = 0;
66 70
67 // Get the content bounds of the app list in the screen. On platforms that 71 // Get the host for child dialogs.
68 // use views, this returns the bounds of the AppListView. Without views, this 72 virtual web_modal::ModalDialogHost* GetDialogHost() = 0;
73
74 // Get the content aize of the app list in the screen. On platforms that
75 // use views, this returns the size of the AppListView. Without views, this
69 // returns a 0x0 rectangle. 76 // returns a 0x0 rectangle.
70 virtual gfx::Rect GetAppListBounds(); 77 virtual gfx::Size GetAppListSize();
71 78
72 // Get the application icon to be used, if any, for the app list. 79 // Get the application icon to be used, if any, for the app list.
73 virtual gfx::ImageSkia GetWindowIcon() = 0; 80 virtual gfx::ImageSkia GetWindowIcon() = 0;
74 81
75 // Control of pinning apps. 82 // Control of pinning apps.
76 virtual bool IsAppPinned(const std::string& extension_id) = 0; 83 virtual bool IsAppPinned(const std::string& extension_id) = 0;
77 virtual void PinApp(const std::string& extension_id) = 0; 84 virtual void PinApp(const std::string& extension_id) = 0;
78 virtual void UnpinApp(const std::string& extension_id) = 0; 85 virtual void UnpinApp(const std::string& extension_id) = 0;
79 virtual Pinnable GetPinnable() = 0; 86 virtual Pinnable GetPinnable() = 0;
80 87
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile); 174 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile);
168 175
169 // Get the list of installed apps for the given profile. 176 // Get the list of installed apps for the given profile.
170 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps); 177 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps);
171 178
172 // Called when a search is started using the app list search box. 179 // Called when a search is started using the app list search box.
173 void OnSearchStarted(); 180 void OnSearchStarted();
174 }; 181 };
175 182
176 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ 183 #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') | ui/app_list/app_list.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698