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

Unified Diff: chrome/browser/shell_integration.cc

Issue 23093020: Set the WM_CLASS property of X11 windows in Linux Aura build. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/shell_integration.cc
diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc
index 505d87b56d54ef15bfec2f59b5221461a70480be..7457ced3ac9817e04492e287535819a529a6ea2c 100644
--- a/chrome/browser/shell_integration.cc
+++ b/chrome/browser/shell_integration.cc
@@ -108,6 +108,16 @@ CommandLine ShellIntegration::CommandLineArgsForLauncher(
return new_cmd_line;
}
+std::string ShellIntegration::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;
+}
+
#if !defined(OS_WIN)
// static
bool ShellIntegration::SetAsDefaultBrowserInteractive() {

Powered by Google App Engine
This is Rietveld 408576698