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

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

Issue 1978443002: Make the IME menu panel more system-like. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_types.h ('k') | ash/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/shelf/shelf_model.h" 5 #include "ash/shelf/shelf_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/shelf/shelf_model_observer.h" 10 #include "ash/shelf/shelf_model_observer.h"
(...skipping 11 matching lines...) Expand all
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_WINDOWED_APP: 25 case TYPE_WINDOWED_APP:
26 case TYPE_PLATFORM_APP: 26 case TYPE_PLATFORM_APP:
27 return 2; 27 return 2;
28 case TYPE_DIALOG: 28 case TYPE_DIALOG:
29 return 3; 29 return 3;
30 case TYPE_APP_PANEL: 30 case TYPE_APP_PANEL:
31 return 4; 31 return 4;
32 case TYPE_IME_MENU:
33 return 5;
32 case TYPE_UNDEFINED: 34 case TYPE_UNDEFINED:
33 NOTREACHED() << "ShelfItemType must be set"; 35 NOTREACHED() << "ShelfItemType must be set";
34 return -1; 36 return -1;
35 } 37 }
36 38
37 NOTREACHED() << "Invalid type " << type; 39 NOTREACHED() << "Invalid type " << type;
38 return 1; 40 return 1;
39 } 41 }
40 42
41 bool CompareByWeight(const ShelfItem& a, const ShelfItem& b) { 43 bool CompareByWeight(const ShelfItem& a, const ShelfItem& b) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 CompareByWeight) - items_.begin(), 170 CompareByWeight) - items_.begin(),
169 static_cast<ShelfItems::difference_type>(index)); 171 static_cast<ShelfItems::difference_type>(index));
170 index = std::min(std::upper_bound(items_.begin(), items_.end(), weight_dummy, 172 index = std::min(std::upper_bound(items_.begin(), items_.end(), weight_dummy,
171 CompareByWeight) - items_.begin(), 173 CompareByWeight) - items_.begin(),
172 static_cast<ShelfItems::difference_type>(index)); 174 static_cast<ShelfItems::difference_type>(index));
173 175
174 return index; 176 return index;
175 } 177 }
176 178
177 } // namespace ash 179 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_item_types.h ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698