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

Side by Side Diff: chrome/browser/web_applications/web_app.cc

Issue 311293002: Ensure ephemeral apps have dock icons on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use new enum instead of hidden Created 6 years, 6 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 Profile* profile, 287 Profile* profile,
288 const ShortcutInfoCallback& callback) { 288 const ShortcutInfoCallback& callback) {
289 GetInfoForApp(extension, 289 GetInfoForApp(extension,
290 profile, 290 profile,
291 base::Bind(&IgnoreFileHandlersInfo, callback)); 291 base::Bind(&IgnoreFileHandlersInfo, callback));
292 } 292 }
293 293
294 bool ShouldCreateShortcutFor(Profile* profile, 294 bool ShouldCreateShortcutFor(Profile* profile,
295 const extensions::Extension* extension) { 295 const extensions::Extension* extension) {
296 return extension->is_platform_app() && 296 return extension->is_platform_app() &&
297 extension->location() != extensions::Manifest::COMPONENT && 297 extension->location() != extensions::Manifest::COMPONENT &&
298 extensions::ui_util::ShouldDisplayInAppLauncher(extension, profile); 298 extensions::ui_util::CanDisplayInAppLauncher(extension, profile);
299 } 299 }
300 300
301 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, 301 base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path,
302 const std::string& extension_id, 302 const std::string& extension_id,
303 const GURL& url) { 303 const GURL& url) {
304 DCHECK(!profile_path.empty()); 304 DCHECK(!profile_path.empty());
305 base::FilePath app_data_dir(profile_path.Append(chrome::kWebAppDirname)); 305 base::FilePath app_data_dir(profile_path.Append(chrome::kWebAppDirname));
306 306
307 if (!extension_id.empty()) { 307 if (!extension_id.empty()) {
308 return app_data_dir.AppendASCII( 308 return app_data_dir.AppendASCII(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 #if defined(OS_LINUX) 448 #if defined(OS_LINUX)
449 std::string GetWMClassFromAppName(std::string app_name) { 449 std::string GetWMClassFromAppName(std::string app_name) {
450 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 450 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
451 base::TrimString(app_name, "_", &app_name); 451 base::TrimString(app_name, "_", &app_name);
452 return app_name; 452 return app_name;
453 } 453 }
454 #endif 454 #endif
455 455
456 } // namespace web_app 456 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_ui_util.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698