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 |
15 using extensions::api::app_runtime::PlayStoreStatus; | |
xiyuan
2016/08/24 20:50:31
Just checking, is "using" allowed in header file?
rkc
2016/08/24 20:56:29
Nope, fixed.
Done.
| |
16 | |
14 class GURL; | 17 class GURL; |
15 class Profile; | 18 class Profile; |
16 | 19 |
17 namespace base { | 20 namespace base { |
18 class CommandLine; | 21 class CommandLine; |
19 class FilePath; | 22 class FilePath; |
20 } | 23 } |
21 | 24 |
22 namespace extensions { | 25 namespace extensions { |
23 class Extension; | 26 class Extension; |
24 namespace api { | 27 namespace api { |
25 namespace app_runtime { | 28 namespace app_runtime { |
26 struct ActionData; | 29 struct ActionData; |
27 } | 30 } |
28 } | 31 } |
29 } | 32 } |
30 | 33 |
31 namespace apps { | 34 namespace apps { |
32 | 35 |
33 // Launches the platform app |app|. Creates appropriate launch data for the | 36 // 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 | 37 // |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, | 38 // |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. | 39 // |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. | 40 // |source| is one of the enumerated values which trace how the app is launched. |
38 void LaunchPlatformAppWithCommandLine(Profile* profile, | 41 void LaunchPlatformAppWithCommandLine( |
39 const extensions::Extension* app, | 42 Profile* profile, |
40 const base::CommandLine& command_line, | 43 const extensions::Extension* app, |
41 const base::FilePath& current_directory, | 44 const base::CommandLine& command_line, |
42 extensions::AppLaunchSource source); | 45 const base::FilePath& current_directory, |
46 extensions::AppLaunchSource source, | |
47 PlayStoreStatus play_store_status = | |
48 PlayStoreStatus::PLAY_STORE_STATUS_UNKNOWN); | |
43 | 49 |
44 // Launches the platform app |app| by issuing an onLaunched event with the | 50 // Launches the platform app |app| by issuing an onLaunched event with the |
45 // contents of |file_path| available through the launch data. | 51 // contents of |file_path| available through the launch data. |
46 void LaunchPlatformAppWithPath(Profile* profile, | 52 void LaunchPlatformAppWithPath(Profile* profile, |
47 const extensions::Extension* app, | 53 const extensions::Extension* app, |
48 const base::FilePath& file_path); | 54 const base::FilePath& file_path); |
49 | 55 |
50 // Launches the platform app |app| with the specific |action_data|. |file_path| | 56 // 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 | 57 // is an optional argument and if present contains the file that the app should |
52 // open w.r.t. the given action. | 58 // open w.r.t. the given action. |
(...skipping 26 matching lines...) Expand all Loading... | |
79 const extensions::Extension* app, | 85 const extensions::Extension* app, |
80 const std::string& handler_id, | 86 const std::string& handler_id, |
81 const GURL& url, | 87 const GURL& url, |
82 const GURL& referrer_url); | 88 const GURL& referrer_url); |
83 | 89 |
84 void RestartPlatformApp(Profile* profile, const extensions::Extension* app); | 90 void RestartPlatformApp(Profile* profile, const extensions::Extension* app); |
85 | 91 |
86 } // namespace apps | 92 } // namespace apps |
87 | 93 |
88 #endif // APPS_LAUNCHER_H_ | 94 #endif // APPS_LAUNCHER_H_ |
OLD | NEW |