Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: chrome/browser/shell_integration_linux.h

Issue 2186813002: Linux: Support the --class argument (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 34 std::string GetProgramClassName(const base::CommandLine& command_line,
35 // first letter capitalized. Equivalent to GDK's gdk_get_program_class(). 35 const std::string& desktop_file_name);
36 std::string GetProgramClassName(); 36 std::string GetProgramClassName();
37 37
38 // Gets the name for use as the res_class of the window's WM_CLASS property.
39 std::string GetProgramClassClass(const base::CommandLine& command_line,
40 const std::string& desktop_file_name);
41 std::string GetProgramClassClass();
Tom (Use chromium acct) 2016/07/27 19:33:09 It feels messy having this be overloaded, but I ne
sky 2016/07/27 19:58:04 Can't the test replace the command line?
Tom (Use chromium acct) 2016/07/27 22:04:34 Yes, but what about the desktop file name? The va
sky 2016/07/27 22:40:21 Agreed, for that you need to pass in the desktop_f
42
38 // Returns filename of the desktop shortcut used to launch the browser. 43 // Returns filename of the desktop shortcut used to launch the browser.
39 std::string GetDesktopName(base::Environment* env); 44 std::string GetDesktopName(base::Environment* env);
40 45
41 // Returns name of the browser icon (without a path or file extension). 46 // Returns name of the browser icon (without a path or file extension).
42 std::string GetIconName(); 47 std::string GetIconName();
43 48
44 // Returns the set of locations in which shortcuts are installed for the 49 // Returns the set of locations in which shortcuts are installed for the
45 // extension with |extension_id| in |profile_path|. 50 // extension with |extension_id| in |profile_path|.
46 // This searches the file system for .desktop files in appropriate locations. A 51 // This searches the file system for .desktop files in appropriate locations. A
47 // shortcut with NoDisplay=true causes hidden to become true, instead of 52 // shortcut with NoDisplay=true causes hidden to become true, instead of
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void DeleteDesktopShortcuts(const base::FilePath& profile_path, 137 void DeleteDesktopShortcuts(const base::FilePath& profile_path,
133 const std::string& extension_id); 138 const std::string& extension_id);
134 139
135 // Delete any desktop shortcuts on desktop or in the application menu that have 140 // Delete any desktop shortcuts on desktop or in the application menu that have
136 // for the profile in |profile_path|. 141 // for the profile in |profile_path|.
137 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path); 142 void DeleteAllDesktopShortcuts(const base::FilePath& profile_path);
138 143
139 } // namespace shell_integration_linux 144 } // namespace shell_integration_linux
140 145
141 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_ 146 #endif // CHROME_BROWSER_SHELL_INTEGRATION_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698