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