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_class (and possibly res_name) of the | 33 // Gets the name for use as the res_name of the window's WM_CLASS property. |
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(). | |
36 std::string GetProgramClassName(); | 34 std::string GetProgramClassName(); |
37 | 35 |
36 // Gets the name for use as the res_class of the window's WM_CLASS property. | |
37 std::string GetProgramClassClass(); | |
38 | |
38 // Returns filename of the desktop shortcut used to launch the browser. | 39 // Returns filename of the desktop shortcut used to launch the browser. |
39 std::string GetDesktopName(base::Environment* env); | 40 std::string GetDesktopName(base::Environment* env); |
40 | 41 |
41 // Returns name of the browser icon (without a path or file extension). | 42 // Returns name of the browser icon (without a path or file extension). |
42 std::string GetIconName(); | 43 std::string GetIconName(); |
43 | 44 |
44 // Returns the set of locations in which shortcuts are installed for the | 45 // Returns the set of locations in which shortcuts are installed for the |
45 // extension with |extension_id| in |profile_path|. | 46 // extension with |extension_id| in |profile_path|. |
46 // This searches the file system for .desktop files in appropriate locations. A | 47 // This searches the file system for .desktop files in appropriate locations. A |
47 // shortcut with NoDisplay=true causes hidden to become true, instead of | 48 // shortcut with NoDisplay=true causes hidden to become true, instead of |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 | 130 |
130 // Delete any desktop shortcuts on desktop or in the application menu that have | 131 // Delete any desktop shortcuts on desktop or in the application menu that have |
131 // been added for the extension with |extension_id| in |profile_path|. | 132 // been added for the extension with |extension_id| in |profile_path|. |
132 void DeleteDesktopShortcuts(const base::FilePath& profile_path, | 133 void DeleteDesktopShortcuts(const base::FilePath& profile_path, |
133 const std::string& extension_id); | 134 const std::string& extension_id); |
134 | 135 |
135 // Delete any desktop shortcuts on desktop or in the application menu that have | 136 // Delete any desktop shortcuts on desktop or in the application menu that have |
136 // for the profile in |profile_path|. | 137 // for the profile in |profile_path|. |
137 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); | 138 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); |
138 | 139 |
140 namespace internal { | |
141 | |
142 std::string GetProgramClassName(const base::CommandLine& command_line, | |
Lei Zhang
2016/07/28 21:28:46
Mention these are exposed only for testing?
Tom (Use chromium acct)
2016/07/28 23:02:13
Done.
| |
143 const std::string& desktop_file_name); | |
144 | |
145 std::string GetProgramClassClass(const base::CommandLine& command_line, | |
146 const std::string& desktop_file_name); | |
147 | |
148 } // namespace internal | |
149 | |
139 } // namespace shell_integration_linux | 150 } // namespace shell_integration_linux |
140 | 151 |
141 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ | 152 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ |
OLD | NEW |