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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 23530020: [cleanup] Remove LauncherItemChanged() from LauncherItemController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 void ChromeLauncherController::LauncherItemMoved(int start_index, 989 void ChromeLauncherController::LauncherItemMoved(int start_index,
990 int target_index) { 990 int target_index) {
991 ash::LauncherID id = model_->items()[target_index].id; 991 ash::LauncherID id = model_->items()[target_index].id;
992 if (HasItemController(id) && IsPinned(id)) 992 if (HasItemController(id) && IsPinned(id))
993 PersistPinnedState(); 993 PersistPinnedState();
994 } 994 }
995 995
996 void ChromeLauncherController::LauncherItemChanged( 996 void ChromeLauncherController::LauncherItemChanged(
997 int index, 997 int index,
998 const ash::LauncherItem& old_item) { 998 const ash::LauncherItem& old_item) {
Mr4D (OOO till 08-26) 2013/09/04 03:47:02 You removed the LauncherItemChanged everywhere. Is
simonhong_ 2013/09/04 04:12:04 This is not needed in CLC. But I can't remove beca
Mr4D (OOO till 08-26) 2013/09/04 14:43:47 Right. But ... I was looking quickly over the 16 r
simonhong_ 2013/09/04 16:41:23 But.. LauncherItemMoved() is still needed by CLC.
999 ash::LauncherID id = model_->items()[index].id;
1000 DCHECK(HasItemController(id));
1001 id_to_item_controller_map_[id]->LauncherItemChanged(index, old_item);
1002 } 999 }
1003 1000
1004 void ChromeLauncherController::LauncherStatusChanged() { 1001 void ChromeLauncherController::LauncherStatusChanged() {
1005 } 1002 }
1006 1003
1007 void ChromeLauncherController::Observe( 1004 void ChromeLauncherController::Observe(
1008 int type, 1005 int type,
1009 const content::NotificationSource& source, 1006 const content::NotificationSource& source,
1010 const content::NotificationDetails& details) { 1007 const content::NotificationDetails& details) {
1011 switch (type) { 1008 switch (type) {
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 // TODO(simon.hong81): Register LauncherItemDelegate when LauncherItemDelegate 1653 // TODO(simon.hong81): Register LauncherItemDelegate when LauncherItemDelegate
1657 // is created. 1654 // is created.
1658 ash::LauncherItemDelegateManager* manager = 1655 ash::LauncherItemDelegateManager* manager =
1659 ash::Shell::GetInstance()->launcher_item_delegate_manager(); 1656 ash::Shell::GetInstance()->launcher_item_delegate_manager();
1660 manager->RegisterLauncherItemDelegate(ash::TYPE_APP_PANEL, this); 1657 manager->RegisterLauncherItemDelegate(ash::TYPE_APP_PANEL, this);
1661 manager->RegisterLauncherItemDelegate(ash::TYPE_APP_SHORTCUT, this); 1658 manager->RegisterLauncherItemDelegate(ash::TYPE_APP_SHORTCUT, this);
1662 manager->RegisterLauncherItemDelegate(ash::TYPE_BROWSER_SHORTCUT, this); 1659 manager->RegisterLauncherItemDelegate(ash::TYPE_BROWSER_SHORTCUT, this);
1663 manager->RegisterLauncherItemDelegate(ash::TYPE_PLATFORM_APP, this); 1660 manager->RegisterLauncherItemDelegate(ash::TYPE_PLATFORM_APP, this);
1664 manager->RegisterLauncherItemDelegate(ash::TYPE_WINDOWED_APP, this); 1661 manager->RegisterLauncherItemDelegate(ash::TYPE_WINDOWED_APP, this);
1665 } 1662 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698