| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #if defined(TOOLKIT_USES_GTK) | 57 #if defined(TOOLKIT_USES_GTK) |
| 58 // GTK+ windows that correspond to web apps need to have a deterministic (and | 58 // GTK+ windows that correspond to web apps need to have a deterministic (and |
| 59 // different) WMClass than normal chrome windows so the window manager groups | 59 // different) WMClass than normal chrome windows so the window manager groups |
| 60 // them as a separate application. | 60 // them as a separate application. |
| 61 std::string GetWMClassFromAppName(std::string app_name); | 61 std::string GetWMClassFromAppName(std::string app_name); |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 namespace internals { | 64 namespace internals { |
| 65 | 65 |
| 66 #if defined(OS_WIN) | 66 #if defined(OS_WIN) |
| 67 FilePath GetSanitizedFileName(const string16& name); | |
| 68 | |
| 69 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image); | 67 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image); |
| 70 #endif | 68 #endif |
| 71 | 69 |
| 72 FilePath GetWebAppDataDirectory(const FilePath& root_dir, | 70 FilePath GetWebAppDataDirectory(const FilePath& root_dir, |
| 73 const ShellIntegration::ShortcutInfo& info); | 71 const ShellIntegration::ShortcutInfo& info); |
| 72 |
| 73 // Does the actual job of creating a shortcut (see CreateShortcut() above). |
| 74 // This must be called on the file thread. |
| 75 void CreateShortcutTask(const FilePath& web_app_path, |
| 76 const FilePath& profile_path, |
| 77 const ShellIntegration::ShortcutInfo& shortcut_info); |
| 78 |
| 79 // Sanitizes |name| and returns a version of it that is safe to use as an |
| 80 // on-disk file name . |
| 81 FilePath GetSanitizedFileName(const string16& name); |
| 82 |
| 74 } // namespace internals | 83 } // namespace internals |
| 75 | 84 |
| 76 } // namespace web_app | 85 } // namespace web_app |
| 77 | 86 |
| 78 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 87 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |