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

Side by Side Diff: chrome/browser/web_applications/web_app.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 unified diff | Download patch
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 #include "chrome/browser/web_applications/web_app.h" 5 #include "chrome/browser/web_applications/web_app.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/i18n/file_util_icu.h" 10 #include "base/i18n/file_util_icu.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // We only take square shaped icons (i.e. width == height). 221 // We only take square shaped icons (i.e. width == height).
222 if (app_info.icons[i].width == app_info.icons[i].height) { 222 if (app_info.icons[i].width == app_info.icons[i].height) {
223 icons->push_back(app_info.icons[i]); 223 icons->push_back(app_info.icons[i]);
224 } 224 }
225 } 225 }
226 226
227 std::sort(icons->begin(), icons->end(), &IconPrecedes); 227 std::sort(icons->begin(), icons->end(), &IconPrecedes);
228 } 228 }
229 #endif 229 #endif
230 230
231 #if defined(TOOLKIT_GTK)
232 std::string GetWMClassFromAppName(std::string app_name) { 231 std::string GetWMClassFromAppName(std::string app_name) {
233 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 232 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
234 TrimString(app_name, "_", &app_name); 233 TrimString(app_name, "_", &app_name);
235 return app_name; 234 return app_name;
236 } 235 }
237 #endif
238 236
239 string16 GetAppShortcutsSubdirName() { 237 string16 GetAppShortcutsSubdirName() {
240 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 238 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
241 if (channel == chrome::VersionInfo::CHANNEL_CANARY) 239 if (channel == chrome::VersionInfo::CHANNEL_CANARY)
242 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY); 240 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY);
243 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME); 241 return l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME);
244 } 242 }
245 243
246 } // namespace web_app 244 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698