OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_APPS_APP_INFO_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "components/web_modal/modal_dialog_host.h" |
9 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
10 | 11 |
11 class Profile; | 12 class Profile; |
12 | 13 |
13 namespace extensions { | 14 namespace extensions { |
14 class Extension; | 15 class Extension; |
15 } | 16 } |
16 | 17 |
17 namespace gfx { | 18 namespace gfx { |
18 class Rect; | 19 class Rect; |
19 class Size; | 20 class Size; |
20 } | 21 } |
21 | 22 |
22 // Used for UMA to track where the App Info dialog is launched from. | 23 // Used for UMA to track where the App Info dialog is launched from. |
23 enum AppInfoLaunchSource { | 24 enum AppInfoLaunchSource { |
24 FROM_APP_LIST, // Launched from the app list context menu. | 25 FROM_APP_LIST, // Launched from the app list context menu. |
25 FROM_EXTENSIONS_PAGE, // Launched from the chrome://extensions page. | 26 FROM_EXTENSIONS_PAGE, // Launched from the chrome://extensions page. |
26 NUM_LAUNCH_SOURCES, | 27 NUM_LAUNCH_SOURCES, |
27 }; | 28 }; |
28 | 29 |
29 // Shows the chrome app information as a frameless window for the given |app| | 30 // Shows the chrome app information as a frameless window for the given |app| |
30 // and |profile| at the given |app_list_bounds|. Appears 'inside' the app list. | 31 // and |profile|. Uses |host| to determine position and bounds. Observes |host| |
31 void ShowAppInfoInAppList(gfx::NativeWindow parent, | 32 // and closes itself when |host| is destroyed. |
32 const gfx::Rect& app_list_bounds, | 33 void ShowAppInfoModally(web_modal::ModalDialogHost* host, |
33 Profile* profile, | 34 const gfx::Size& size, |
34 const extensions::Extension* app, | 35 Profile* profile, |
35 const base::Closure& close_callback); | 36 const extensions::Extension* app, |
36 | 37 const base::Closure& close_callback); |
37 // Shows the chrome app information in a native dialog box of the given |size|. | |
38 void ShowAppInfoInNativeDialog(gfx::NativeWindow parent, | |
39 const gfx::Size& size, | |
40 Profile* profile, | |
41 const extensions::Extension* app, | |
42 const base::Closure& close_callback); | |
43 | 38 |
44 #endif // CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_ | 39 #endif // CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_ |
OLD | NEW |