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" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "chrome/common/extensions/extension_constants.h" | 12 #include "chrome/common/extensions/extension_constants.h" |
13 #include "extensions/common/api/app_runtime.h" | |
14 #include "extensions/common/constants.h" | 13 #include "extensions/common/constants.h" |
15 #include "ui/base/window_open_disposition.h" | 14 #include "ui/base/window_open_disposition.h" |
16 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
17 #include "url/gurl.h" | 16 #include "url/gurl.h" |
18 | 17 |
19 class Profile; | 18 class Profile; |
20 | 19 |
21 namespace extensions { | 20 namespace extensions { |
22 class Extension; | 21 class Extension; |
23 } | 22 } |
24 | 23 |
25 struct AppLaunchParams { | 24 struct AppLaunchParams { |
26 AppLaunchParams(Profile* profile, | 25 AppLaunchParams(Profile* profile, |
27 const extensions::Extension* extension, | 26 const extensions::Extension* extension, |
28 extensions::LaunchContainer container, | 27 extensions::LaunchContainer container, |
29 WindowOpenDisposition disposition, | 28 WindowOpenDisposition disposition, |
30 extensions::AppLaunchSource source, | 29 extensions::AppLaunchSource source); |
31 bool set_playstore_status = false); | |
32 | 30 |
33 AppLaunchParams(const AppLaunchParams& other); | 31 AppLaunchParams(const AppLaunchParams& other); |
34 | 32 |
35 ~AppLaunchParams(); | 33 ~AppLaunchParams(); |
36 | 34 |
37 // The profile to load the application from. | 35 // The profile to load the application from. |
38 Profile* profile; | 36 Profile* profile; |
39 | 37 |
40 // The extension to load. | 38 // The extension to load. |
41 std::string extension_id; | 39 std::string extension_id; |
(...skipping 15 matching lines...) Expand all Loading... |
57 // application. | 55 // application. |
58 base::CommandLine command_line; | 56 base::CommandLine command_line; |
59 | 57 |
60 // If non-empty, the current directory from which any relative paths on the | 58 // If non-empty, the current directory from which any relative paths on the |
61 // command line should be expanded from. | 59 // command line should be expanded from. |
62 base::FilePath current_directory; | 60 base::FilePath current_directory; |
63 | 61 |
64 // Record where the app is launched from for tracking purpose. | 62 // Record where the app is launched from for tracking purpose. |
65 // Different app may have their own enumeration of sources. | 63 // Different app may have their own enumeration of sources. |
66 extensions::AppLaunchSource source; | 64 extensions::AppLaunchSource source; |
67 | |
68 // Status of ARC++ on this device. | |
69 extensions::api::app_runtime::PlayStoreStatus play_store_status; | |
70 }; | 65 }; |
71 | 66 |
72 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with | 67 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with |
73 // LAUNCH_TYPE_REGULAR to check for a user-configured container. | 68 // LAUNCH_TYPE_REGULAR to check for a user-configured container. |
74 AppLaunchParams CreateAppLaunchParamsUserContainer( | 69 AppLaunchParams CreateAppLaunchParamsUserContainer( |
75 Profile* profile, | 70 Profile* profile, |
76 const extensions::Extension* extension, | 71 const extensions::Extension* extension, |
77 WindowOpenDisposition disposition, | 72 WindowOpenDisposition disposition, |
78 extensions::AppLaunchSource source); | 73 extensions::AppLaunchSource source); |
79 | 74 |
80 // Helper to create AppLaunchParams using event flags that allows user to | 75 // Helper to create AppLaunchParams using event flags that allows user to |
81 // override the user-configured container using modifier keys, falling back to | 76 // override the user-configured container using modifier keys, falling back to |
82 // extensions::GetLaunchContainer() with no modifiers. | 77 // extensions::GetLaunchContainer() with no modifiers. |
83 AppLaunchParams CreateAppLaunchParamsWithEventFlags( | 78 AppLaunchParams CreateAppLaunchParamsWithEventFlags( |
84 Profile* profile, | 79 Profile* profile, |
85 const extensions::Extension* extension, | 80 const extensions::Extension* extension, |
86 int event_flags, | 81 int event_flags, |
87 extensions::AppLaunchSource source); | 82 extensions::AppLaunchSource source); |
88 | 83 |
89 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ | 84 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ |
OLD | NEW |