OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_EXTENSIONS_APP_LAUNCH_PARAMS_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class Extension; | 22 class Extension; |
23 } | 23 } |
24 | 24 |
25 struct AppLaunchParams { | 25 struct AppLaunchParams { |
26 AppLaunchParams(Profile* profile, | 26 AppLaunchParams(Profile* profile, |
27 const extensions::Extension* extension, | 27 const extensions::Extension* extension, |
28 extensions::LaunchContainer container, | 28 extensions::LaunchContainer container, |
29 WindowOpenDisposition disposition, | 29 WindowOpenDisposition disposition, |
30 extensions::AppLaunchSource source); | 30 extensions::AppLaunchSource source); |
31 | 31 |
| 32 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with |
| 33 // LAUNCH_TYPE_REGULAR to check for a user-configured container. |
| 34 AppLaunchParams(Profile* profile, |
| 35 const extensions::Extension* extension, |
| 36 WindowOpenDisposition disposition, |
| 37 extensions::AppLaunchSource source); |
| 38 |
32 // Helper to create AppLaunchParams using event flags that allows user to | 39 // Helper to create AppLaunchParams using event flags that allows user to |
33 // override the user-configured container using modifier keys, falling back to | 40 // override the user-configured container using modifier keys, falling back to |
34 // extensions::GetLaunchContainer() with no modifiers. | 41 // extensions::GetLaunchContainer() with no modifiers. |desktop_type| |
| 42 // indicates the desktop upon which to launch (Ash or Native). |
35 AppLaunchParams(Profile* profile, | 43 AppLaunchParams(Profile* profile, |
36 const extensions::Extension* extension, | 44 const extensions::Extension* extension, |
37 WindowOpenDisposition disposition, | 45 WindowOpenDisposition disposition, |
| 46 chrome::HostDesktopType desktop_type, |
38 extensions::AppLaunchSource source); | 47 extensions::AppLaunchSource source); |
39 | 48 |
40 ~AppLaunchParams(); | 49 ~AppLaunchParams(); |
41 | 50 |
42 // The profile to load the application from. | 51 // The profile to load the application from. |
43 Profile* profile; | 52 Profile* profile; |
44 | 53 |
45 // The extension to load. | 54 // The extension to load. |
46 std::string extension_id; | 55 std::string extension_id; |
47 | 56 |
48 // The container type to launch the application in. | 57 // The container type to launch the application in. |
49 extensions::LaunchContainer container; | 58 extensions::LaunchContainer container; |
50 | 59 |
51 // If container is TAB, this field controls how the tab is opened. | 60 // If container is TAB, this field controls how the tab is opened. |
52 WindowOpenDisposition disposition; | 61 WindowOpenDisposition disposition; |
53 | 62 |
| 63 // The desktop type to launch on. Uses GetActiveDesktop() if unspecified. |
| 64 chrome::HostDesktopType desktop_type; |
| 65 |
54 // If non-empty, use override_url in place of the application's launch url. | 66 // If non-empty, use override_url in place of the application's launch url. |
55 GURL override_url; | 67 GURL override_url; |
56 | 68 |
57 // If non-empty, use override_boudns in place of the application's default | 69 // If non-empty, use override_boudns in place of the application's default |
58 // position and dimensions. | 70 // position and dimensions. |
59 gfx::Rect override_bounds; | 71 gfx::Rect override_bounds; |
60 | 72 |
61 // If non-empty, information from the command line may be passed on to the | 73 // If non-empty, information from the command line may be passed on to the |
62 // application. | 74 // application. |
63 base::CommandLine command_line; | 75 base::CommandLine command_line; |
64 | 76 |
65 // If non-empty, the current directory from which any relative paths on the | 77 // If non-empty, the current directory from which any relative paths on the |
66 // command line should be expanded from. | 78 // command line should be expanded from. |
67 base::FilePath current_directory; | 79 base::FilePath current_directory; |
68 | 80 |
69 // Record where the app is launched from for tracking purpose. | 81 // Record where the app is launched from for tracking purpose. |
70 // Different app may have their own enumeration of sources. | 82 // Different app may have their own enumeration of sources. |
71 extensions::AppLaunchSource source; | 83 extensions::AppLaunchSource source; |
72 }; | 84 }; |
73 | 85 |
74 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ | 86 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ |
OLD | NEW |