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

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: Simplify by using web_app functionality and remove app_shim_util stuff. Created 7 years, 7 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/callback.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "chrome/browser/shell_integration.h" 14 #include "chrome/browser/shell_integration.h"
14 #include "chrome/common/web_application_info.h" 15 #include "chrome/common/web_application_info.h"
15 16
16 namespace extensions { 17 namespace extensions {
17 class Extension; 18 class Extension;
18 } 19 }
19 20
20 namespace gfx { 21 namespace gfx {
21 class ImageFamily; 22 class ImageFamily;
22 } 23 }
23 24
25 class Profile;
26
24 namespace web_app { 27 namespace web_app {
25 28
26 // Gets the user data directory for given web app. The path for the directory is 29 // 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 30 // based on |extension_id|. If |extension_id| is empty then |url| is used
28 // to construct a unique ID. 31 // to construct a unique ID.
29 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, 32 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path,
30 const std::string& extension_id, 33 const std::string& extension_id,
31 const GURL& url); 34 const GURL& url);
32 35
33 // Gets the user data directory to use for |extension| located inside 36 // 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) 91 #if defined(TOOLKIT_GTK)
89 // GTK+ windows that correspond to web apps need to have a deterministic (and 92 // 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 93 // different) WMClass than normal chrome windows so the window manager groups
91 // them as a separate application. 94 // them as a separate application.
92 std::string GetWMClassFromAppName(std::string app_name); 95 std::string GetWMClassFromAppName(std::string app_name);
93 #endif 96 #endif
94 97
95 // Gets the name of the Chrome Apps menu folder in which to place app shortcuts. 98 // Gets the name of the Chrome Apps menu folder in which to place app shortcuts.
96 string16 GetAppShortcutsSubdirName(); 99 string16 GetAppShortcutsSubdirName();
97 100
101 #if defined(OS_MACOSX)
102 void LaunchShim(Profile* profile,
tapted 2013/05/17 06:44:00 This can probably go into web_app_mac.h. But you s
jackhou1 2013/05/21 03:13:22 I just if-defined this into a no-op for non-mac. I
103 const extensions::Extension* extension,
104 base::Callback<void(bool)> completed);
105 #endif
106
98 namespace internals { 107 namespace internals {
99 108
100 #if defined(OS_WIN) 109 #if defined(OS_WIN)
101 bool CheckAndSaveIcon(const base::FilePath& icon_file, 110 bool CheckAndSaveIcon(const base::FilePath& icon_file,
102 const gfx::ImageFamily& image); 111 const gfx::ImageFamily& image);
103 112
104 std::vector<base::FilePath> GetShortcutPaths( 113 std::vector<base::FilePath> GetShortcutPaths(
105 const ShellIntegration::ShortcutLocations& creation_locations); 114 const ShellIntegration::ShortcutLocations& creation_locations);
106 #endif 115 #endif
107 116
(...skipping 24 matching lines...) Expand all
132 141
133 // Sanitizes |name| and returns a version of it that is safe to use as an 142 // Sanitizes |name| and returns a version of it that is safe to use as an
134 // on-disk file name . 143 // on-disk file name .
135 base::FilePath GetSanitizedFileName(const string16& name); 144 base::FilePath GetSanitizedFileName(const string16& name);
136 145
137 } // namespace internals 146 } // namespace internals
138 147
139 } // namespace web_app 148 } // namespace web_app
140 149
141 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 150 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698