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 |
19 using extensions::api::app_runtime::PlayStoreStatus; | |
20 | |
18 class Profile; | 21 class Profile; |
19 | 22 |
20 namespace extensions { | 23 namespace extensions { |
21 class Extension; | 24 class Extension; |
22 } | 25 } |
23 | 26 |
24 struct AppLaunchParams { | 27 struct AppLaunchParams { |
25 AppLaunchParams(Profile* profile, | 28 AppLaunchParams(Profile* profile, |
26 const extensions::Extension* extension, | 29 const extensions::Extension* extension, |
27 extensions::LaunchContainer container, | 30 extensions::LaunchContainer container, |
28 WindowOpenDisposition disposition, | 31 WindowOpenDisposition disposition, |
29 extensions::AppLaunchSource source); | 32 extensions::AppLaunchSource source, |
33 bool set_playstore_status = false); | |
sky
2016/08/24 20:34:23
Document what set_playstore_status means.
| |
30 | 34 |
31 AppLaunchParams(const AppLaunchParams& other); | 35 AppLaunchParams(const AppLaunchParams& other); |
32 | 36 |
33 ~AppLaunchParams(); | 37 ~AppLaunchParams(); |
34 | 38 |
35 // The profile to load the application from. | 39 // The profile to load the application from. |
36 Profile* profile; | 40 Profile* profile; |
37 | 41 |
38 // The extension to load. | 42 // The extension to load. |
39 std::string extension_id; | 43 std::string extension_id; |
(...skipping 15 matching lines...) Expand all Loading... | |
55 // application. | 59 // application. |
56 base::CommandLine command_line; | 60 base::CommandLine command_line; |
57 | 61 |
58 // If non-empty, the current directory from which any relative paths on the | 62 // If non-empty, the current directory from which any relative paths on the |
59 // command line should be expanded from. | 63 // command line should be expanded from. |
60 base::FilePath current_directory; | 64 base::FilePath current_directory; |
61 | 65 |
62 // Record where the app is launched from for tracking purpose. | 66 // Record where the app is launched from for tracking purpose. |
63 // Different app may have their own enumeration of sources. | 67 // Different app may have their own enumeration of sources. |
64 extensions::AppLaunchSource source; | 68 extensions::AppLaunchSource source; |
69 | |
70 // Status of ARC++ on this device. | |
71 PlayStoreStatus play_store_status; | |
sky
2016/08/24 16:20:39
Isn't arc chromeos specific? In other words, shoul
rkc
2016/08/24 20:02:36
Whoops - yep. Put all of that code behind #ifdefs
sky
2016/08/24 20:34:23
As long as this doesn't result in pulling in any a
| |
65 }; | 72 }; |
66 | 73 |
67 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with | 74 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with |
68 // LAUNCH_TYPE_REGULAR to check for a user-configured container. | 75 // LAUNCH_TYPE_REGULAR to check for a user-configured container. |
69 AppLaunchParams CreateAppLaunchParamsUserContainer( | 76 AppLaunchParams CreateAppLaunchParamsUserContainer( |
70 Profile* profile, | 77 Profile* profile, |
71 const extensions::Extension* extension, | 78 const extensions::Extension* extension, |
72 WindowOpenDisposition disposition, | 79 WindowOpenDisposition disposition, |
73 extensions::AppLaunchSource source); | 80 extensions::AppLaunchSource source); |
74 | 81 |
75 // Helper to create AppLaunchParams using event flags that allows user to | 82 // Helper to create AppLaunchParams using event flags that allows user to |
76 // override the user-configured container using modifier keys, falling back to | 83 // override the user-configured container using modifier keys, falling back to |
77 // extensions::GetLaunchContainer() with no modifiers. | 84 // extensions::GetLaunchContainer() with no modifiers. |
78 AppLaunchParams CreateAppLaunchParamsWithEventFlags( | 85 AppLaunchParams CreateAppLaunchParamsWithEventFlags( |
79 Profile* profile, | 86 Profile* profile, |
80 const extensions::Extension* extension, | 87 const extensions::Extension* extension, |
81 int event_flags, | 88 int event_flags, |
82 extensions::AppLaunchSource source); | 89 extensions::AppLaunchSource source); |
83 | 90 |
84 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ | 91 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ |
OLD | NEW |