| 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_SHELL_INTEGRATION_LINUX_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
| 6 #define CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 const std::string& icon_name); | 112 const std::string& icon_name); |
| 113 | 113 |
| 114 // Create shortcuts on the desktop or in the application menu (as specified by | 114 // Create shortcuts on the desktop or in the application menu (as specified by |
| 115 // |shortcut_info|), for the web page or extension in |shortcut_info|. | 115 // |shortcut_info|), for the web page or extension in |shortcut_info|. |
| 116 // For extensions, duplicate shortcuts are avoided, so if a requested shortcut | 116 // For extensions, duplicate shortcuts are avoided, so if a requested shortcut |
| 117 // already exists it is deleted first. | 117 // already exists it is deleted first. |
| 118 bool CreateDesktopShortcut( | 118 bool CreateDesktopShortcut( |
| 119 const web_app::ShortcutInfo& shortcut_info, | 119 const web_app::ShortcutInfo& shortcut_info, |
| 120 const web_app::ShortcutLocations& creation_locations); | 120 const web_app::ShortcutLocations& creation_locations); |
| 121 | 121 |
| 122 #if defined(ENABLE_APP_LIST) |
| 122 // Create shortcuts in the application menu for the app launcher. Duplicate | 123 // Create shortcuts in the application menu for the app launcher. Duplicate |
| 123 // shortcuts are avoided, so if a requested shortcut already exists it is | 124 // shortcuts are avoided, so if a requested shortcut already exists it is |
| 124 // deleted first. Also creates the icon required by the shortcut. | 125 // deleted first. Also creates the icon required by the shortcut. |
| 125 bool CreateAppListDesktopShortcut(const std::string& wm_class, | 126 bool CreateAppListDesktopShortcut(const std::string& wm_class, |
| 126 const std::string& title); | 127 const std::string& title); |
| 128 #endif |
| 127 | 129 |
| 128 // Delete any desktop shortcuts on desktop or in the application menu that have | 130 // Delete any desktop shortcuts on desktop or in the application menu that have |
| 129 // been added for the extension with |extension_id| in |profile_path|. | 131 // been added for the extension with |extension_id| in |profile_path|. |
| 130 void DeleteDesktopShortcuts(const base::FilePath& profile_path, | 132 void DeleteDesktopShortcuts(const base::FilePath& profile_path, |
| 131 const std::string& extension_id); | 133 const std::string& extension_id); |
| 132 | 134 |
| 133 // Delete any desktop shortcuts on desktop or in the application menu that have | 135 // Delete any desktop shortcuts on desktop or in the application menu that have |
| 134 // for the profile in |profile_path|. | 136 // for the profile in |profile_path|. |
| 135 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); | 137 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); |
| 136 | 138 |
| 137 } // namespace shell_integration_linux | 139 } // namespace shell_integration_linux |
| 138 | 140 |
| 139 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ | 141 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
| OLD | NEW |