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

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

Issue 2545923004: Remove LauncherItemController::type; use ShelfItems::type. (Closed)
Patch Set: Rebase; remove new LauncherItemController::TYPE_APP check. Created 4 years 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_types.h ('k') | ash/common/shelf/shelf_view.cc » ('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/common/shelf/shelf_model.h" 5 #include "ash/common/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/common/shelf/shelf_item_delegate.h"
10 #include "ash/common/shelf/shelf_model_observer.h" 10 #include "ash/common/shelf/shelf_model_observer.h"
(...skipping 10 matching lines...) Expand all
21 return 0; 21 return 0;
22 case TYPE_BROWSER_SHORTCUT: 22 case TYPE_BROWSER_SHORTCUT:
23 case TYPE_APP_SHORTCUT: 23 case TYPE_APP_SHORTCUT:
24 return 1; 24 return 1;
25 case TYPE_APP: 25 case TYPE_APP:
26 return 2; 26 return 2;
27 case TYPE_DIALOG: 27 case TYPE_DIALOG:
28 return 3; 28 return 3;
29 case TYPE_APP_PANEL: 29 case TYPE_APP_PANEL:
30 return 4; 30 return 4;
31 case TYPE_IME_MENU:
32 return 5;
33 case TYPE_UNDEFINED: 31 case TYPE_UNDEFINED:
34 NOTREACHED() << "ShelfItemType must be set"; 32 NOTREACHED() << "ShelfItemType must be set";
35 return -1; 33 return -1;
36 } 34 }
37 35
38 NOTREACHED() << "Invalid type " << type; 36 NOTREACHED() << "Invalid type " << type;
39 return 1; 37 return 1;
40 } 38 }
41 39
42 bool CompareByWeight(const ShelfItem& a, const ShelfItem& b) { 40 bool CompareByWeight(const ShelfItem& a, const ShelfItem& b) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 198
201 return index; 199 return index;
202 } 200 }
203 201
204 void ShelfModel::RemoveShelfItemDelegate(ShelfID id) { 202 void ShelfModel::RemoveShelfItemDelegate(ShelfID id) {
205 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end()) 203 if (id_to_item_delegate_map_.find(id) != id_to_item_delegate_map_.end())
206 id_to_item_delegate_map_.erase(id); 204 id_to_item_delegate_map_.erase(id);
207 } 205 }
208 206
209 } // namespace ash 207 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_item_types.h ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698