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

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

Issue 819823002: Fixed create application shortcuts on Windows/Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Compute a deterministic name based on an extension/apps's id. 161 // Compute a deterministic name based on an extension/apps's id.
162 std::string GenerateApplicationNameFromExtensionId(const std::string& id); 162 std::string GenerateApplicationNameFromExtensionId(const std::string& id);
163 163
164 // Extracts the extension id from the app name. 164 // Extracts the extension id from the app name.
165 std::string GetExtensionIdFromApplicationName(const std::string& app_name); 165 std::string GetExtensionIdFromApplicationName(const std::string& app_name);
166 166
167 // Create shortcuts for web application based on given shortcut data. 167 // Create shortcuts for web application based on given shortcut data.
168 // |shortcut_info| contains information about the shortcuts to create, and 168 // |shortcut_info| contains information about the shortcuts to create, and
169 // |locations| contains information about where to create them, while 169 // |locations| contains information about where to create them, while
170 // |file_handlers_info| contains information about the file handlers to create. 170 // |file_handlers_info| contains information about the file handlers to create.
171 // The difference between this function and CreateNonAppShortcut, is that this
172 // function ensures that both the profile and extension exists first.
171 void CreateShortcutsWithInfo( 173 void CreateShortcutsWithInfo(
172 ShortcutCreationReason reason, 174 ShortcutCreationReason reason,
173 const ShortcutLocations& locations, 175 const ShortcutLocations& locations,
174 const ShortcutInfo& shortcut_info, 176 const ShortcutInfo& shortcut_info,
175 const extensions::FileHandlersInfo& file_handlers_info); 177 const extensions::FileHandlersInfo& file_handlers_info);
176 178
177 // Currently only called by app_list_service_mac to create a shim for the 179 // Currently only called by app_list_service_mac (to create a shim for the
178 // app launcher. 180 // app launcher) and create_application_shortcut_view (to create extension
179 void CreateNonAppShortcut(const ShortcutLocations& locations, 181 // shortcuts).
180 const ShortcutInfo& shortcut_info); 182 void CreateNonAppShortcut(
183 ShortcutCreationReason reason,
184 const ShortcutLocations& locations,
185 const ShortcutInfo& shortcut_info,
186 const extensions::FileHandlersInfo& file_handlers_info);
181 187
182 // Creates shortcuts for an app. This loads the app's icon from disk, and calls 188 // Creates shortcuts for an app. This loads the app's icon from disk, and calls
183 // CreateShortcutsWithInfo(). If you already have a ShortcutInfo with the app's 189 // CreateShortcutsWithInfo(). If you already have a ShortcutInfo with the app's
184 // icon loaded, you should use CreateShortcutsWithInfo() directly. 190 // icon loaded, you should use CreateShortcutsWithInfo() directly.
185 void CreateShortcuts(ShortcutCreationReason reason, 191 void CreateShortcuts(ShortcutCreationReason reason,
186 const ShortcutLocations& locations, 192 const ShortcutLocations& locations,
187 Profile* profile, 193 Profile* profile,
188 const extensions::Extension* app); 194 const extensions::Extension* app);
189 195
190 // Delete all shortcuts that have been created for the given profile and 196 // Delete all shortcuts that have been created for the given profile and
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 269
264 // Sanitizes |name| and returns a version of it that is safe to use as an 270 // Sanitizes |name| and returns a version of it that is safe to use as an
265 // on-disk file name . 271 // on-disk file name .
266 base::FilePath GetSanitizedFileName(const base::string16& name); 272 base::FilePath GetSanitizedFileName(const base::string16& name);
267 273
268 } // namespace internals 274 } // namespace internals
269 275
270 } // namespace web_app 276 } // namespace web_app
271 277
272 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ 278 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698