| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 class CommandLine; | |
| 11 class GURL; | 10 class GURL; |
| 12 class Profile; | 11 class Profile; |
| 13 | 12 |
| 14 namespace base { | 13 namespace base { |
| 14 class CommandLine; |
| 15 class FilePath; | 15 class FilePath; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 class Extension; | 19 class Extension; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace apps { | 22 namespace apps { |
| 23 | 23 |
| 24 // Launches the platform app |extension|. Creates appropriate launch data for | 24 // Launches the platform app |extension|. Creates appropriate launch data for |
| 25 // the |command_line| fields present. |extension| and |profile| must not be | 25 // the |command_line| fields present. |extension| and |profile| must not be |
| 26 // NULL. An empty |command_line| means there is no launch data. If non-empty, | 26 // NULL. An empty |command_line| means there is no launch data. If non-empty, |
| 27 // |current_directory| is used to expand any relative paths on the command line. | 27 // |current_directory| is used to expand any relative paths on the command line. |
| 28 void LaunchPlatformAppWithCommandLine(Profile* profile, | 28 void LaunchPlatformAppWithCommandLine(Profile* profile, |
| 29 const extensions::Extension* extension, | 29 const extensions::Extension* extension, |
| 30 const CommandLine& command_line, | 30 const base::CommandLine& command_line, |
| 31 const base::FilePath& current_directory); | 31 const base::FilePath& current_directory); |
| 32 | 32 |
| 33 // Launches the platform app |extension| by issuing an onLaunched event | 33 // Launches the platform app |extension| by issuing an onLaunched event |
| 34 // with the contents of |file_path| available through the launch data. | 34 // with the contents of |file_path| available through the launch data. |
| 35 void LaunchPlatformAppWithPath(Profile* profile, | 35 void LaunchPlatformAppWithPath(Profile* profile, |
| 36 const extensions::Extension* extension, | 36 const extensions::Extension* extension, |
| 37 const base::FilePath& file_path); | 37 const base::FilePath& file_path); |
| 38 | 38 |
| 39 // Launches the platform app |extension| with no launch data. | 39 // Launches the platform app |extension| with no launch data. |
| 40 void LaunchPlatformApp(Profile* profile, | 40 void LaunchPlatformApp(Profile* profile, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 const std::string& handler_id, | 58 const std::string& handler_id, |
| 59 const GURL& url, | 59 const GURL& url, |
| 60 const GURL& referrer_url); | 60 const GURL& referrer_url); |
| 61 | 61 |
| 62 void RestartPlatformApp(Profile* profile, | 62 void RestartPlatformApp(Profile* profile, |
| 63 const extensions::Extension* extension); | 63 const extensions::Extension* extension); |
| 64 | 64 |
| 65 } // namespace apps | 65 } // namespace apps |
| 66 | 66 |
| 67 #endif // APPS_LAUNCHER_H_ | 67 #endif // APPS_LAUNCHER_H_ |
| OLD | NEW |