Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 #if defined(TOOLKIT_USES_GTK) | 60 #if defined(TOOLKIT_USES_GTK) |
| 61 // GTK+ windows that correspond to web apps need to have a deterministic (and | 61 // GTK+ windows that correspond to web apps need to have a deterministic (and |
| 62 // different) WMClass than normal chrome windows so the window manager groups | 62 // different) WMClass than normal chrome windows so the window manager groups |
| 63 // them as a separate application. | 63 // them as a separate application. |
| 64 std::string GetWMClassFromAppName(std::string app_name); | 64 std::string GetWMClassFromAppName(std::string app_name); |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 namespace internals { | 67 namespace internals { |
| 68 | 68 |
| 69 #if defined(OS_WIN) | 69 #if defined(OS_WIN) |
| 70 FilePath GetSanitizedFileName(const string16& name); | |
| 71 | |
| 72 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image); | 70 bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image); |
| 73 #endif | 71 #endif |
| 74 | 72 |
| 75 FilePath GetWebAppDataDirectory(const FilePath& root_dir, | 73 FilePath GetWebAppDataDirectory(const FilePath& root_dir, |
| 76 const ShellIntegration::ShortcutInfo& info); | 74 const ShellIntegration::ShortcutInfo& info); |
| 75 | |
| 76 // Does the actual job of creating a shortcut (see CreateShortcut() above). | |
| 77 // This must be called on the file thread. | |
| 78 void CreateShortcutTask(const FilePath& web_app_path, | |
| 79 const FilePath& profile_path, | |
| 80 const ShellIntegration::ShortcutInfo& shortcut_info); | |
| 81 | |
| 82 // Sanitizes |name| and returns a version of it that is safe to use as an | |
| 83 // on-disk file name . | |
|
Robert Sesek
2012/02/09 02:03:32
nit: extra space before .
| |
| 84 FilePath GetSanitizedFileName(const string16& name); | |
| 85 | |
| 77 } // namespace internals | 86 } // namespace internals |
| 78 | 87 |
| 79 } // namespace web_app | 88 } // namespace web_app |
| 80 | 89 |
| 81 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 90 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |