Clear GCMProfileService::account_id_ in when signing out
[chromium-blink-merge.git] / apps / launcher.h
blobeb2d98fb265bb0bd33daa6a89aa9f63343f23c18
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
3 // found in the LICENSE file.
5 #ifndef APPS_LAUNCHER_H_
6 #define APPS_LAUNCHER_H_
8 #include <string>
9 #include <vector>
11 class GURL;
12 class Profile;
14 namespace base {
15 class CommandLine;
16 class FilePath;
19 namespace extensions {
20 class Extension;
23 namespace apps {
25 // Launches the platform app |extension|. Creates appropriate launch data for
26 // the |command_line| fields present. |extension| and |profile| must not be
27 // NULL. An empty |command_line| means there is no launch data. If non-empty,
28 // |current_directory| is used to expand any relative paths on the command line.
29 void LaunchPlatformAppWithCommandLine(Profile* profile,
30 const extensions::Extension* extension,
31 const base::CommandLine& command_line,
32 const base::FilePath& current_directory);
34 // Launches the platform app |extension| by issuing an onLaunched event
35 // with the contents of |file_path| available through the launch data.
36 void LaunchPlatformAppWithPath(Profile* profile,
37 const extensions::Extension* extension,
38 const base::FilePath& file_path);
40 // Launches the platform app |extension| with no launch data.
41 void LaunchPlatformApp(Profile* profile,
42 const extensions::Extension* extension);
44 // Launches the platform app |extension| with |handler_id| and the contents of
45 // |file_paths| available through the launch data. |handler_id| corresponds to
46 // the id of the file_handlers item in the manifest that resulted in a match
47 // that triggered this launch.
48 void LaunchPlatformAppWithFileHandler(
49 Profile* profile,
50 const extensions::Extension* extension,
51 const std::string& handler_id,
52 const std::vector<base::FilePath>& file_paths);
54 // Launches the platform app |extension| with |handler_id|, |url| and
55 // |referrer_url| available through the launch data. |handler_id| corresponds to
56 // the id of the file_handlers item in the manifest that resulted in a match
57 // that triggered this launch.
58 void LaunchPlatformAppWithUrl(Profile* profile,
59 const extensions::Extension* extension,
60 const std::string& handler_id,
61 const GURL& url,
62 const GURL& referrer_url);
64 void RestartPlatformApp(Profile* profile,
65 const extensions::Extension* extension);
67 } // namespace apps
69 #endif // APPS_LAUNCHER_H_