| 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 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 const InfoCallback& callback); | 128 const InfoCallback& callback); |
| 129 | 129 |
| 130 // Populates a ShortcutInfo for the given |extension| in |profile| and passes | 130 // Populates a ShortcutInfo for the given |extension| in |profile| and passes |
| 131 // it to |callback| after asynchronously loading all icon representations. This | 131 // it to |callback| after asynchronously loading all icon representations. This |
| 132 // is equivalent to GetInfoForApp, but it throws away the FileHandlersInfo. | 132 // is equivalent to GetInfoForApp, but it throws away the FileHandlersInfo. |
| 133 void GetShortcutInfoForApp(const extensions::Extension* extension, | 133 void GetShortcutInfoForApp(const extensions::Extension* extension, |
| 134 Profile* profile, | 134 Profile* profile, |
| 135 const ShortcutInfoCallback& callback); | 135 const ShortcutInfoCallback& callback); |
| 136 | 136 |
| 137 // Whether to create a shortcut for this type of extension. | 137 // Whether to create a shortcut for this type of extension. |
| 138 bool ShouldCreateShortcutFor(Profile* profile, | 138 bool ShouldCreateShortcutFor(web_app::ShortcutCreationReason reason, |
| 139 Profile* profile, |
| 139 const extensions::Extension* extension); | 140 const extensions::Extension* extension); |
| 140 | 141 |
| 141 // Gets the user data directory for given web app. The path for the directory is | 142 // Gets the user data directory for given web app. The path for the directory is |
| 142 // based on |extension_id|. If |extension_id| is empty then |url| is used | 143 // based on |extension_id|. If |extension_id| is empty then |url| is used |
| 143 // to construct a unique ID. | 144 // to construct a unique ID. |
| 144 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, | 145 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, |
| 145 const std::string& extension_id, | 146 const std::string& extension_id, |
| 146 const GURL& url); | 147 const GURL& url); |
| 147 | 148 |
| 148 // Gets the user data directory to use for |extension| located inside | 149 // Gets the user data directory to use for |extension| located inside |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 264 |
| 264 // Sanitizes |name| and returns a version of it that is safe to use as an | 265 // Sanitizes |name| and returns a version of it that is safe to use as an |
| 265 // on-disk file name . | 266 // on-disk file name . |
| 266 base::FilePath GetSanitizedFileName(const base::string16& name); | 267 base::FilePath GetSanitizedFileName(const base::string16& name); |
| 267 | 268 |
| 268 } // namespace internals | 269 } // namespace internals |
| 269 | 270 |
| 270 } // namespace web_app | 271 } // namespace web_app |
| 271 | 272 |
| 272 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 273 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |