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