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

Side by Side Diff: chrome/browser/web_applications/web_app.h

Issue 14579006: Start app shim when app launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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_WEB_APPLICATIONS_WEB_APP_H_ 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chrome/browser/shell_integration.h" 13 #include "chrome/browser/shell_integration.h"
14 #include "chrome/common/web_application_info.h" 14 #include "chrome/common/web_application_info.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 class Extension; 17 class Extension;
18 } 18 }
19 19
20 namespace gfx { 20 namespace gfx {
21 class ImageFamily; 21 class ImageFamily;
22 } 22 }
23 23
24 class Profile;
25
24 namespace web_app { 26 namespace web_app {
25 27
26 // Gets the user data directory for given web app. The path for the directory is 28 // Gets the user data directory for given web app. The path for the directory is
27 // based on |extension_id|. If |extension_id| is empty then |url| is used 29 // based on |extension_id|. If |extension_id| is empty then |url| is used
28 // to construct a unique ID. 30 // to construct a unique ID.
29 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, 31 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path,
30 const std::string& extension_id, 32 const std::string& extension_id,
31 const GURL& url); 33 const GURL& url);
32 34
33 // Gets the user data directory to use for |extension| located inside 35 // Gets the user data directory to use for |extension| located inside
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #if defined(TOOLKIT_GTK) 90 #if defined(TOOLKIT_GTK)
89 // GTK+ windows that correspond to web apps need to have a deterministic (and 91 // GTK+ windows that correspond to web apps need to have a deterministic (and
90 // different) WMClass than normal chrome windows so the window manager groups 92 // different) WMClass than normal chrome windows so the window manager groups
91 // them as a separate application. 93 // them as a separate application.
92 std::string GetWMClassFromAppName(std::string app_name); 94 std::string GetWMClassFromAppName(std::string app_name);
93 #endif 95 #endif
94 96
95 // Gets the name of the Chrome Apps menu folder in which to place app shortcuts. 97 // Gets the name of the Chrome Apps menu folder in which to place app shortcuts.
96 string16 GetAppShortcutsSubdirName(); 98 string16 GetAppShortcutsSubdirName();
97 99
100 // If necessary, launch the shortcut for an app.
101 void MaybeLaunchShortcut(const ShellIntegration::ShortcutInfo& shortcut_info);
102
98 namespace internals { 103 namespace internals {
99 104
100 #if defined(OS_WIN) 105 #if defined(OS_WIN)
101 bool CheckAndSaveIcon(const base::FilePath& icon_file, 106 bool CheckAndSaveIcon(const base::FilePath& icon_file,
102 const gfx::ImageFamily& image); 107 const gfx::ImageFamily& image);
103 108
104 std::vector<base::FilePath> GetShortcutPaths( 109 std::vector<base::FilePath> GetShortcutPaths(
105 const ShellIntegration::ShortcutLocations& creation_locations); 110 const ShellIntegration::ShortcutLocations& creation_locations);
106 #endif 111 #endif
107 112
(...skipping 24 matching lines...) Expand all
132 137
133 // Sanitizes |name| and returns a version of it that is safe to use as an 138 // Sanitizes |name| and returns a version of it that is safe to use as an
134 // on-disk file name . 139 // on-disk file name .
135 base::FilePath GetSanitizedFileName(const string16& name); 140 base::FilePath GetSanitizedFileName(const string16& name);
136 141
137 } // namespace internals 142 } // namespace internals
138 143
139 } // namespace web_app 144 } // namespace web_app
140 145
141 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 146 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698