Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 | |
| 101 // If necessary, launch the shortcut for an app. | |
| 102 void MaybeLaunchShortcut(Profile* profile, | |
|
tapted
2013/05/29 04:20:30
Can this be moved to web_app_mac.h now? (and remov
jackhou1
2013/05/29 05:53:04
chrome/browser/web_applications/web_app_mac.h is n
tapted
2013/05/29 06:16:01
I think it makes sense to add web_app_mac.h to DEP
| |
| 103 const extensions::Extension* extension); | |
| 104 | |
| 98 namespace internals { | 105 namespace internals { |
| 99 | 106 |
| 100 #if defined(OS_WIN) | 107 #if defined(OS_WIN) |
| 101 bool CheckAndSaveIcon(const base::FilePath& icon_file, | 108 bool CheckAndSaveIcon(const base::FilePath& icon_file, |
| 102 const gfx::ImageFamily& image); | 109 const gfx::ImageFamily& image); |
| 103 | 110 |
| 104 std::vector<base::FilePath> GetShortcutPaths( | 111 std::vector<base::FilePath> GetShortcutPaths( |
| 105 const ShellIntegration::ShortcutLocations& creation_locations); | 112 const ShellIntegration::ShortcutLocations& creation_locations); |
| 106 #endif | 113 #endif |
| 107 | 114 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 132 | 139 |
| 133 // Sanitizes |name| and returns a version of it that is safe to use as an | 140 // Sanitizes |name| and returns a version of it that is safe to use as an |
| 134 // on-disk file name . | 141 // on-disk file name . |
| 135 base::FilePath GetSanitizedFileName(const string16& name); | 142 base::FilePath GetSanitizedFileName(const string16& name); |
| 136 | 143 |
| 137 } // namespace internals | 144 } // namespace internals |
| 138 | 145 |
| 139 } // namespace web_app | 146 } // namespace web_app |
| 140 | 147 |
| 141 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 148 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |