| 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" |
| 11 #include "chrome/browser/web_applications/web_app.h" | 11 #include "chrome/browser/web_applications/web_app.h" |
| 12 #include "chrome/common/features.h" |
| 12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class CommandLine; | 16 class CommandLine; |
| 16 class Environment; | 17 class Environment; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace shell_integration_linux { | 20 namespace shell_integration_linux { |
| 20 | 21 |
| 21 // Get the path to write user-specific application data files to, as specified | 22 // Get the path to write user-specific application data files to, as specified |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const std::string& icon_name); | 114 const std::string& icon_name); |
| 114 | 115 |
| 115 // Create shortcuts on the desktop or in the application menu (as specified by | 116 // Create shortcuts on the desktop or in the application menu (as specified by |
| 116 // |shortcut_info|), for the web page or extension in |shortcut_info|. | 117 // |shortcut_info|), for the web page or extension in |shortcut_info|. |
| 117 // For extensions, duplicate shortcuts are avoided, so if a requested shortcut | 118 // For extensions, duplicate shortcuts are avoided, so if a requested shortcut |
| 118 // already exists it is deleted first. | 119 // already exists it is deleted first. |
| 119 bool CreateDesktopShortcut( | 120 bool CreateDesktopShortcut( |
| 120 const web_app::ShortcutInfo& shortcut_info, | 121 const web_app::ShortcutInfo& shortcut_info, |
| 121 const web_app::ShortcutLocations& creation_locations); | 122 const web_app::ShortcutLocations& creation_locations); |
| 122 | 123 |
| 123 #if defined(ENABLE_APP_LIST) | 124 #if BUILDFLAG(ENABLE_APP_LIST) |
| 124 // Create shortcuts in the application menu for the app launcher. Duplicate | 125 // Create shortcuts in the application menu for the app launcher. Duplicate |
| 125 // shortcuts are avoided, so if a requested shortcut already exists it is | 126 // shortcuts are avoided, so if a requested shortcut already exists it is |
| 126 // deleted first. Also creates the icon required by the shortcut. | 127 // deleted first. Also creates the icon required by the shortcut. |
| 127 bool CreateAppListDesktopShortcut(const std::string& wm_class, | 128 bool CreateAppListDesktopShortcut(const std::string& wm_class, |
| 128 const std::string& title); | 129 const std::string& title); |
| 129 #endif | 130 #endif |
| 130 | 131 |
| 131 // Delete any desktop shortcuts on desktop or in the application menu that have | 132 // Delete any desktop shortcuts on desktop or in the application menu that have |
| 132 // been added for the extension with |extension_id| in |profile_path|. | 133 // been added for the extension with |extension_id| in |profile_path|. |
| 133 void DeleteDesktopShortcuts(const base::FilePath& profile_path, | 134 void DeleteDesktopShortcuts(const base::FilePath& profile_path, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 144 std::string GetProgramClassName(const base::CommandLine& command_line, | 145 std::string GetProgramClassName(const base::CommandLine& command_line, |
| 145 const std::string& desktop_file_name); | 146 const std::string& desktop_file_name); |
| 146 std::string GetProgramClassClass(const base::CommandLine& command_line, | 147 std::string GetProgramClassClass(const base::CommandLine& command_line, |
| 147 const std::string& desktop_file_name); | 148 const std::string& desktop_file_name); |
| 148 | 149 |
| 149 } // namespace internal | 150 } // namespace internal |
| 150 | 151 |
| 151 } // namespace shell_integration_linux | 152 } // namespace shell_integration_linux |
| 152 | 153 |
| 153 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ | 154 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
| OLD | NEW |