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

Side by Side Diff: ash/shelf/shelf_item_delegate_manager.cc

Issue 1811203002: Remove unused ShelfModelObserver::ShelfStatusChanged() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make SetStatus a simple setter, set_status. Created 4 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
« no previous file with comments | « ash/shelf/shelf_item_delegate_manager.h ('k') | ash/shelf/shelf_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shelf/shelf_item_delegate_manager.h" 5 #include "ash/shelf/shelf_item_delegate_manager.h"
6 6
7 #include "ash/shelf/shelf_item_delegate.h" 7 #include "ash/shelf/shelf_item_delegate.h"
8 #include "ash/shelf/shelf_model.h" 8 #include "ash/shelf/shelf_model.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 ShelfItemDelegate* ShelfItemDelegateManager::GetShelfItemDelegate(ShelfID id) { 52 ShelfItemDelegate* ShelfItemDelegateManager::GetShelfItemDelegate(ShelfID id) {
53 if (model_->ItemIndexByID(id) != -1) { 53 if (model_->ItemIndexByID(id) != -1) {
54 // Each ShelfItem has to have a ShelfItemDelegate. 54 // Each ShelfItem has to have a ShelfItemDelegate.
55 DCHECK(id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()); 55 DCHECK(id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end());
56 return id_to_item_delegate_map_[id]; 56 return id_to_item_delegate_map_[id];
57 } 57 }
58 return NULL; 58 return NULL;
59 } 59 }
60 60
61 void ShelfItemDelegateManager::ShelfItemAdded(int index) { 61 void ShelfItemDelegateManager::ShelfItemAdded(int index) {}
62 }
63 62
64 void ShelfItemDelegateManager::ShelfItemRemoved(int index, ShelfID id) { 63 void ShelfItemDelegateManager::ShelfItemRemoved(int index, ShelfID id) {
65 RemoveShelfItemDelegate(id); 64 RemoveShelfItemDelegate(id);
66 FOR_EACH_OBSERVER(ShelfItemDelegateManagerObserver, 65 FOR_EACH_OBSERVER(ShelfItemDelegateManagerObserver,
67 observers_, 66 observers_,
68 OnSetShelfItemDelegate(id, nullptr)); 67 OnSetShelfItemDelegate(id, nullptr));
69 } 68 }
70 69
71 void ShelfItemDelegateManager::ShelfItemMoved(int start_index, 70 void ShelfItemDelegateManager::ShelfItemMoved(int start_index,
72 int target_index) { 71 int target_index) {}
73 }
74 72
75 void ShelfItemDelegateManager::ShelfItemChanged(int index, 73 void ShelfItemDelegateManager::ShelfItemChanged(int index,
76 const ShelfItem& old_item) { 74 const ShelfItem& old_item) {}
77 }
78
79 void ShelfItemDelegateManager::ShelfStatusChanged() {
80 }
81 75
82 void ShelfItemDelegateManager::RemoveShelfItemDelegate(ShelfID id) { 76 void ShelfItemDelegateManager::RemoveShelfItemDelegate(ShelfID id) {
83 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) { 77 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) {
84 delete id_to_item_delegate_map_[id]; 78 delete id_to_item_delegate_map_[id];
85 id_to_item_delegate_map_.erase(id); 79 id_to_item_delegate_map_.erase(id);
86 } 80 }
87 } 81 }
88 82
89 } // namespace ash 83 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_item_delegate_manager.h ('k') | ash/shelf/shelf_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698