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

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

Issue 2046513003: mash: Move shelf model and item classes to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@initshelfearly
Patch Set: Created 4 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
« no previous file with comments | « ash/common/shelf/shelf_item_delegate_manager.h ('k') | ash/common/shelf/shelf_item_types.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/common/shelf/shelf_item_delegate_manager.h"
6 6
7 #include "ash/shelf/shelf_item_delegate.h" 7 #include "ash/common/shelf/shelf_item_delegate.h"
8 #include "ash/shelf/shelf_model.h" 8 #include "ash/common/shelf/shelf_model.h"
9 #include "ash/shell.h"
10 #include "base/logging.h" 9 #include "base/logging.h"
11 #include "base/stl_util.h" 10 #include "base/stl_util.h"
12 11
13 namespace ash { 12 namespace ash {
14 13
15 ShelfItemDelegateManager::ShelfItemDelegateManager(ShelfModel* model) 14 ShelfItemDelegateManager::ShelfItemDelegateManager(ShelfModel* model)
16 : model_(model) { 15 : model_(model) {
17 DCHECK(model_); 16 DCHECK(model_);
18 model_->AddObserver(this); 17 model_->AddObserver(this);
19 } 18 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const ShelfItem& old_item) {} 73 const ShelfItem& old_item) {}
75 74
76 void ShelfItemDelegateManager::RemoveShelfItemDelegate(ShelfID id) { 75 void ShelfItemDelegateManager::RemoveShelfItemDelegate(ShelfID id) {
77 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) { 76 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) {
78 delete id_to_item_delegate_map_[id]; 77 delete id_to_item_delegate_map_[id];
79 id_to_item_delegate_map_.erase(id); 78 id_to_item_delegate_map_.erase(id);
80 } 79 }
81 } 80 }
82 81
83 } // namespace ash 82 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_item_delegate_manager.h ('k') | ash/common/shelf/shelf_item_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698