Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/browser/extensions/platform_app_launcher.h

Issue 15947007: Move application restart and relaunch code out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pafooey Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 class CommandLine; 11 class CommandLine;
12 class Profile; 12 class Profile;
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 namespace extensions { 22 namespace extensions {
23 23
24 class Extension; 24 class Extension;
25 25
26 // Launches the platform app |extension|. Creates appropriate launch data for 26 // Launches the platform app |extension|. Creates appropriate launch data for
27 // the |command_line| fields present. |extension| and |profile| must not be 27 // the |command_line| fields present. |extension| and |profile| must not be
28 // NULL. A NULL |command_line| means there is no launch data. If non-empty, 28 // NULL. A NULL |command_line| means there is no launch data. If non-empty,
29 // |current_directory| is used to expand any relative paths on the command line. 29 // |current_directory| is used to expand any relative paths on the command line.
30 void LaunchPlatformApp(Profile* profile, 30 void LaunchPlatformAppWithCommandLine(Profile* profile,
31 const Extension* extension, 31 const Extension* extension,
32 const CommandLine* command_line, 32 const CommandLine* command_line,
33 const base::FilePath& current_directory); 33 const base::FilePath& current_directory);
34 34
35 // Launches the platform app |extension| with the contents of |file_path| 35 // Launches the platform app |extension| with the contents of |file_path|
36 // available through the launch data. 36 // available through the launch data.
37 void LaunchPlatformAppWithPath(Profile* profile, 37 void LaunchPlatformAppWithPath(Profile* profile,
38 const Extension* extension, 38 const Extension* extension,
39 const base::FilePath& file_path); 39 const base::FilePath& file_path);
40 40
41 // Launches the platform app |extension| with no launch data.
42 void LaunchPlatformApp(Profile* profile, const Extension* extension);
43
41 // Launches the platform app |extension| with the contents of |file_path| 44 // Launches the platform app |extension| with the contents of |file_path|
42 // available through the launch data. 45 // available through the launch data.
43 void LaunchPlatformAppWithFileHandler(Profile* profile, 46 void LaunchPlatformAppWithFileHandler(Profile* profile,
44 const Extension* extension, 47 const Extension* extension,
45 const std::string& handler_id, 48 const std::string& handler_id,
46 const base::FilePath& file_path); 49 const base::FilePath& file_path);
47 50
48 void RestartPlatformApp(Profile* profile, const Extension* extension); 51 void RestartPlatformApp(Profile* profile, const Extension* extension);
49 52
50 } // namespace extensions 53 } // namespace extensions
51 54
52 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_ 55 #endif // CHROME_BROWSER_EXTENSIONS_PLATFORM_APP_LAUNCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/load_and_launch_browsertest.cc ('k') | chrome/browser/extensions/platform_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698