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

Side by Side Diff: ash/launcher/launcher_model.cc

Issue 12288012: Showing launcher items for windowed v1 apps - pinned or not. Also - don't show windowed v1 apps in … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing build breakage with clang Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/launcher/launcher_navigator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/launcher/launcher_model.h" 5 #include "ash/launcher/launcher_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_model_observer.h" 9 #include "ash/launcher/launcher_model_observer.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 namespace { 13 namespace {
14 14
15 int LauncherItemTypeToWeight(LauncherItemType type) { 15 int LauncherItemTypeToWeight(LauncherItemType type) {
16 switch (type) { 16 switch (type) {
17 case TYPE_BROWSER_SHORTCUT: 17 case TYPE_BROWSER_SHORTCUT:
18 return 0; 18 return 0;
19 case TYPE_APP_SHORTCUT: 19 case TYPE_APP_SHORTCUT:
20 case TYPE_WINDOWED_APP:
20 return 1; 21 return 1;
21 case TYPE_TABBED: 22 case TYPE_TABBED:
22 case TYPE_PLATFORM_APP: 23 case TYPE_PLATFORM_APP:
23 return 2; 24 return 2;
24 case TYPE_APP_LIST: 25 case TYPE_APP_LIST:
25 return 3; 26 return 3;
26 case TYPE_APP_PANEL: 27 case TYPE_APP_PANEL:
27 return 4; 28 return 4;
28 } 29 }
29 30
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 CompareByWeight) - items_.begin(), 154 CompareByWeight) - items_.begin(),
154 static_cast<LauncherItems::difference_type>(index)); 155 static_cast<LauncherItems::difference_type>(index));
155 index = std::min(std::upper_bound(items_.begin(), items_.end(), weight_dummy, 156 index = std::min(std::upper_bound(items_.begin(), items_.end(), weight_dummy,
156 CompareByWeight) - items_.begin(), 157 CompareByWeight) - items_.begin(),
157 static_cast<LauncherItems::difference_type>(index)); 158 static_cast<LauncherItems::difference_type>(index));
158 159
159 return index; 160 return index;
160 } 161 }
161 162
162 } // namespace ash 163 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698