OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 APPS_LAUNCHER_H_ | 5 #ifndef APPS_LAUNCHER_H_ |
6 #define APPS_LAUNCHER_H_ | 6 #define APPS_LAUNCHER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "extensions/common/api/app_runtime.h" |
12 #include "extensions/common/constants.h" | 13 #include "extensions/common/constants.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
15 class Profile; | 16 class Profile; |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class CommandLine; | 19 class CommandLine; |
19 class FilePath; | 20 class FilePath; |
20 } | 21 } |
21 | 22 |
22 namespace extensions { | 23 namespace extensions { |
23 class Extension; | 24 class Extension; |
24 namespace api { | 25 namespace api { |
25 namespace app_runtime { | 26 namespace app_runtime { |
26 struct ActionData; | 27 struct ActionData; |
27 } | 28 } |
28 } | 29 } |
29 } | 30 } |
30 | 31 |
31 namespace apps { | 32 namespace apps { |
32 | 33 |
33 // Launches the platform app |app|. Creates appropriate launch data for the | 34 // Launches the platform app |app|. Creates appropriate launch data for the |
34 // |command_line| fields present. |app| and |profile| must not be NULL. An empty | 35 // |command_line| fields present. |app| and |profile| must not be NULL. An empty |
35 // |command_line| means there is no launch data. If non-empty, | 36 // |command_line| means there is no launch data. If non-empty, |
36 // |current_directory| is used to expand any relative paths on the command line. | 37 // |current_directory| is used to expand any relative paths on the command line. |
37 // |source| is one of the enumerated values which trace how the app is launched. | 38 // |source| is one of the enumerated values which trace how the app is launched. |
38 void LaunchPlatformAppWithCommandLine(Profile* profile, | 39 void LaunchPlatformAppWithCommandLine( |
39 const extensions::Extension* app, | 40 Profile* profile, |
40 const base::CommandLine& command_line, | 41 const extensions::Extension* app, |
41 const base::FilePath& current_directory, | 42 const base::CommandLine& command_line, |
42 extensions::AppLaunchSource source); | 43 const base::FilePath& current_directory, |
| 44 extensions::AppLaunchSource source, |
| 45 extensions::api::app_runtime::PlayStoreStatus play_store_status = |
| 46 extensions::api::app_runtime::PlayStoreStatus:: |
| 47 PLAY_STORE_STATUS_UNKNOWN); |
43 | 48 |
44 // Launches the platform app |app| by issuing an onLaunched event with the | 49 // Launches the platform app |app| by issuing an onLaunched event with the |
45 // contents of |file_path| available through the launch data. | 50 // contents of |file_path| available through the launch data. |
46 void LaunchPlatformAppWithPath(Profile* profile, | 51 void LaunchPlatformAppWithPath(Profile* profile, |
47 const extensions::Extension* app, | 52 const extensions::Extension* app, |
48 const base::FilePath& file_path); | 53 const base::FilePath& file_path); |
49 | 54 |
50 // Launches the platform app |app| with the specific |action_data|. |file_path| | 55 // Launches the platform app |app| with the specific |action_data|. |file_path| |
51 // is an optional argument and if present contains the file that the app should | 56 // is an optional argument and if present contains the file that the app should |
52 // open w.r.t. the given action. | 57 // open w.r.t. the given action. |
(...skipping 26 matching lines...) Expand all Loading... |
79 const extensions::Extension* app, | 84 const extensions::Extension* app, |
80 const std::string& handler_id, | 85 const std::string& handler_id, |
81 const GURL& url, | 86 const GURL& url, |
82 const GURL& referrer_url); | 87 const GURL& referrer_url); |
83 | 88 |
84 void RestartPlatformApp(Profile* profile, const extensions::Extension* app); | 89 void RestartPlatformApp(Profile* profile, const extensions::Extension* app); |
85 | 90 |
86 } // namespace apps | 91 } // namespace apps |
87 | 92 |
88 #endif // APPS_LAUNCHER_H_ | 93 #endif // APPS_LAUNCHER_H_ |
OLD | NEW |