summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/shell_integration_linux.cc')
-rw-r--r--chrome/browser/shell_integration_linux.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index 8fc4cd6..c7cd4ed 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -545,6 +545,16 @@ std::vector<base::FilePath> GetDataSearchLocations(base::Environment* env) {
return search_paths;
}
+std::string GetProgramClassName() {
+ DCHECK(CommandLine::InitializedForCurrentProcess());
+ // Get the res_name component from argv[0].
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ std::string class_name = command_line->GetProgram().BaseName().value();
+ if (!class_name.empty())
+ class_name[0] = base::ToUpperASCII(class_name[0]);
+ return class_name;
+}
+
std::string GetDesktopName(base::Environment* env) {
#if defined(GOOGLE_CHROME_BUILD)
return "google-chrome.desktop";
@@ -761,11 +771,9 @@ std::string GetDesktopFileContents(
if (no_display)
g_key_file_set_string(key_file, kDesktopEntry, "NoDisplay", "true");
-#if defined(TOOLKIT_GTK)
std::string wmclass = web_app::GetWMClassFromAppName(app_name);
g_key_file_set_string(key_file, kDesktopEntry, "StartupWMClass",
wmclass.c_str());
-#endif
gsize length = 0;
gchar* data_dump = g_key_file_to_data(key_file, &length, NULL);