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

Side by Side Diff: chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.cc

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 9 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 | Annotate | Revision Log
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/ui/views/aura/launcher/chrome_launcher_delegate.h" 5 #include "chrome/browser/ui/views/aura/launcher/chrome_launcher_delegate.h"
6 6
7 #include "ash/launcher/launcher_model.h" 7 #include "ash/launcher/launcher_model.h"
8 #include "ash/launcher/launcher_types.h" 8 #include "ash/launcher/launcher_types.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 ash::LauncherID id) { 344 ash::LauncherID id) {
345 DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end()); 345 DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());
346 return id_to_item_map_[id].app_type; 346 return id_to_item_map_[id].app_type;
347 } 347 }
348 348
349 std::string ChromeLauncherDelegate::GetAppID(TabContentsWrapper* tab) { 349 std::string ChromeLauncherDelegate::GetAppID(TabContentsWrapper* tab) {
350 return app_icon_loader_->GetAppID(tab); 350 return app_icon_loader_->GetAppID(tab);
351 } 351 }
352 352
353 void ChromeLauncherDelegate::SetAppImage(const std::string& id, 353 void ChromeLauncherDelegate::SetAppImage(const std::string& id,
354 SkBitmap* image) { 354 const SkBitmap* image) {
355 for (IDToItemMap::const_iterator i = id_to_item_map_.begin(); 355 for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
356 i != id_to_item_map_.end(); ++i) { 356 i != id_to_item_map_.end(); ++i) {
357 if (i->second.app_id == id) { 357 if (i->second.app_id == id) {
358 int index = model_->ItemIndexByID(i->first); 358 int index = model_->ItemIndexByID(i->first);
359 ash::LauncherItem item = model_->items()[index]; 359 ash::LauncherItem item = model_->items()[index];
360 item.image = image ? *image : Extension::GetDefaultIcon(true); 360 item.image = image ? *image : Extension::GetDefaultIcon(true);
361 model_->Set(index, item); 361 model_->Set(index, item);
362 // It's possible we're waiting on more than one item, so don't break. 362 // It's possible we're waiting on more than one item, so don't break.
363 } 363 }
364 } 364 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 Profile* ChromeLauncherDelegate::GetProfileForNewWindows() { 470 Profile* ChromeLauncherDelegate::GetProfileForNewWindows() {
471 Profile* profile = ProfileManager::GetDefaultProfile(); 471 Profile* profile = ProfileManager::GetDefaultProfile();
472 if (browser_defaults::kAlwaysOpenIncognitoWindow && 472 if (browser_defaults::kAlwaysOpenIncognitoWindow &&
473 IncognitoModePrefs::ShouldLaunchIncognito( 473 IncognitoModePrefs::ShouldLaunchIncognito(
474 *CommandLine::ForCurrentProcess(), 474 *CommandLine::ForCurrentProcess(),
475 profile->GetPrefs())) { 475 profile->GetPrefs())) {
476 profile = profile->GetOffTheRecordProfile(); 476 profile = profile->GetOffTheRecordProfile();
477 } 477 }
478 return profile; 478 return profile;
479 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698