| 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 12 matching lines...) Expand all Loading... |
| 23 // http://standards.freedesktop.org/basedir-spec/latest/ | 23 // http://standards.freedesktop.org/basedir-spec/latest/ |
| 24 // Called on the FILE thread. | 24 // Called on the FILE thread. |
| 25 base::FilePath GetDataWriteLocation(base::Environment* env); | 25 base::FilePath GetDataWriteLocation(base::Environment* env); |
| 26 | 26 |
| 27 // Get the list of paths to search for application data files, in order of | 27 // Get the list of paths to search for application data files, in order of |
| 28 // preference, as specified in the XDG Base Directory Specification: | 28 // preference, as specified in the XDG Base Directory Specification: |
| 29 // http://standards.freedesktop.org/basedir-spec/latest/ | 29 // http://standards.freedesktop.org/basedir-spec/latest/ |
| 30 // Called on the FILE thread. | 30 // Called on the FILE thread. |
| 31 std::vector<base::FilePath> GetDataSearchLocations(base::Environment* env); | 31 std::vector<base::FilePath> GetDataSearchLocations(base::Environment* env); |
| 32 | 32 |
| 33 // Gets the name for use as the res_name of the window's WM_CLASS property. | 33 // Gets the name for use as the res_class (and possibly res_name) of the |
| 34 // window's WM_CLASS property. This is the program name from argv[0], with the |
| 35 // first letter capitalized. Equivalent to GDK's gdk_get_program_class(). |
| 34 std::string GetProgramClassName(); | 36 std::string GetProgramClassName(); |
| 35 | 37 |
| 36 // Gets the name for use as the res_class of the window's WM_CLASS property. | |
| 37 std::string GetProgramClassClass(); | |
| 38 | |
| 39 // Returns filename of the desktop shortcut used to launch the browser. | 38 // Returns filename of the desktop shortcut used to launch the browser. |
| 40 std::string GetDesktopName(base::Environment* env); | 39 std::string GetDesktopName(base::Environment* env); |
| 41 | 40 |
| 42 // Returns name of the browser icon (without a path or file extension). | 41 // Returns name of the browser icon (without a path or file extension). |
| 43 std::string GetIconName(); | 42 std::string GetIconName(); |
| 44 | 43 |
| 45 // Returns the set of locations in which shortcuts are installed for the | 44 // Returns the set of locations in which shortcuts are installed for the |
| 46 // extension with |extension_id| in |profile_path|. | 45 // extension with |extension_id| in |profile_path|. |
| 47 // This searches the file system for .desktop files in appropriate locations. A | 46 // This searches the file system for .desktop files in appropriate locations. A |
| 48 // shortcut with NoDisplay=true causes hidden to become true, instead of | 47 // shortcut with NoDisplay=true causes hidden to become true, instead of |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 129 |
| 131 // 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 |
| 132 // been added for the extension with |extension_id| in |profile_path|. | 131 // been added for the extension with |extension_id| in |profile_path|. |
| 133 void DeleteDesktopShortcuts(const base::FilePath& profile_path, | 132 void DeleteDesktopShortcuts(const base::FilePath& profile_path, |
| 134 const std::string& extension_id); | 133 const std::string& extension_id); |
| 135 | 134 |
| 136 // 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 |
| 137 // for the profile in |profile_path|. | 136 // for the profile in |profile_path|. |
| 138 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); | 137 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); |
| 139 | 138 |
| 140 namespace internal { | |
| 141 | |
| 142 // Exposed for testing. Clients should use the corresponding functions in | |
| 143 // shell_integration_linux instead. | |
| 144 std::string GetProgramClassName(const base::CommandLine& command_line, | |
| 145 const std::string& desktop_file_name); | |
| 146 std::string GetProgramClassClass(const base::CommandLine& command_line, | |
| 147 const std::string& desktop_file_name); | |
| 148 | |
| 149 } // namespace internal | |
| 150 | |
| 151 } // namespace shell_integration_linux | 139 } // namespace shell_integration_linux |
| 152 | 140 |
| 153 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ | 141 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
| OLD | NEW |