OLD | NEW |
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/common/shelf/shelf_model.h" | 5 #include "ash/shelf/shelf_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/shelf/shelf_item_delegate.h" | 9 #include "ash/shelf/shelf_item_delegate.h" |
10 #include "ash/common/shelf/shelf_model_observer.h" | 10 #include "ash/shelf/shelf_model_observer.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 int ShelfItemTypeToWeight(ShelfItemType type) { | 16 int ShelfItemTypeToWeight(ShelfItemType type) { |
17 switch (type) { | 17 switch (type) { |
18 case TYPE_APP_LIST: | 18 case TYPE_APP_LIST: |
19 // TODO(skuhne): If the app list item becomes movable again, this need | 19 // TODO(skuhne): If the app list item becomes movable again, this need |
20 // to be a fallthrough. | 20 // to be a fallthrough. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 return index; | 203 return index; |
204 } | 204 } |
205 | 205 |
206 void ShelfModel::RemoveShelfItemDelegate(ShelfID id) { | 206 void ShelfModel::RemoveShelfItemDelegate(ShelfID id) { |
207 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) | 207 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) |
208 id_to_item_delegate_map_.erase(id); | 208 id_to_item_delegate_map_.erase(id); |
209 } | 209 } |
210 | 210 |
211 } // namespace ash | 211 } // namespace ash |
OLD | NEW |