| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 SHORTCUT_CREATION_AUTOMATED, | 96 SHORTCUT_CREATION_AUTOMATED, |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // Called by GetInfoForApp after fetching the ShortcutInfo and FileHandlersInfo. | 99 // Called by GetInfoForApp after fetching the ShortcutInfo and FileHandlersInfo. |
| 100 typedef base::Callback<void(const ShortcutInfo&, | 100 typedef base::Callback<void(const ShortcutInfo&, |
| 101 const extensions::FileHandlersInfo&)> InfoCallback; | 101 const extensions::FileHandlersInfo&)> InfoCallback; |
| 102 | 102 |
| 103 // Called by UpdateShortcutInfoAndIconForApp after loading the icon. | 103 // Called by UpdateShortcutInfoAndIconForApp after loading the icon. |
| 104 typedef base::Callback<void(const ShortcutInfo&)> ShortcutInfoCallback; | 104 typedef base::Callback<void(const ShortcutInfo&)> ShortcutInfoCallback; |
| 105 | 105 |
| 106 #if defined(TOOLKIT_VIEWS) |
| 106 // Extracts shortcut info of the given WebContents. | 107 // Extracts shortcut info of the given WebContents. |
| 107 void GetShortcutInfoForTab(content::WebContents* web_contents, | 108 void GetShortcutInfoForTab(content::WebContents* web_contents, |
| 108 ShortcutInfo* info); | 109 ShortcutInfo* info); |
| 110 #endif |
| 109 | 111 |
| 110 // Updates web app shortcut of the WebContents. This function checks and | 112 // Updates web app shortcut of the WebContents. This function checks and |
| 111 // updates web app icon and shortcuts if needed. For icon, the check is based | 113 // updates web app icon and shortcuts if needed. For icon, the check is based |
| 112 // on MD5 hash of icon image. For shortcuts, it checks the desktop, start menu | 114 // on MD5 hash of icon image. For shortcuts, it checks the desktop, start menu |
| 113 // and quick launch (as well as pinned shortcut) for shortcut and only | 115 // and quick launch (as well as pinned shortcut) for shortcut and only |
| 114 // updates (recreates) them if they exits. | 116 // updates (recreates) them if they exits. |
| 115 void UpdateShortcutForTabContents(content::WebContents* web_contents); | 117 void UpdateShortcutForTabContents(content::WebContents* web_contents); |
| 116 | 118 |
| 117 ShortcutInfo ShortcutInfoForExtensionAndProfile( | 119 ShortcutInfo ShortcutInfoForExtensionAndProfile( |
| 118 const extensions::Extension* app, | 120 const extensions::Extension* app, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 258 |
| 257 // Sanitizes |name| and returns a version of it that is safe to use as an | 259 // Sanitizes |name| and returns a version of it that is safe to use as an |
| 258 // on-disk file name . | 260 // on-disk file name . |
| 259 base::FilePath GetSanitizedFileName(const base::string16& name); | 261 base::FilePath GetSanitizedFileName(const base::string16& name); |
| 260 | 262 |
| 261 } // namespace internals | 263 } // namespace internals |
| 262 | 264 |
| 263 } // namespace web_app | 265 } // namespace web_app |
| 264 | 266 |
| 265 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 267 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |