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

Side by Side Diff: ash/shell/app_list.cc

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation errors in app list unit tests on mac Created 7 years, 3 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 | « no previous file | chrome/browser/ui/app_list/extension_app_item.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 <string> 5 #include <string>
6 6
7 #include "ash/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell/example_factory.h" 9 #include "ash/shell/example_factory.h"
10 #include "ash/shell/toplevel_window.h" 10 #include "ash/shell/toplevel_window.h"
(...skipping 27 matching lines...) Expand all
38 enum Type { 38 enum Type {
39 TOPLEVEL_WINDOW = 0, 39 TOPLEVEL_WINDOW = 0,
40 NON_RESIZABLE_WINDOW, 40 NON_RESIZABLE_WINDOW,
41 LOCK_SCREEN, 41 LOCK_SCREEN,
42 WIDGETS_WINDOW, 42 WIDGETS_WINDOW,
43 EXAMPLES_WINDOW, 43 EXAMPLES_WINDOW,
44 LAST_TYPE, 44 LAST_TYPE,
45 }; 45 };
46 46
47 explicit WindowTypeLauncherItem(Type type) : type_(type) { 47 explicit WindowTypeLauncherItem(Type type) : type_(type) {
48 std::string title(GetTitle(type));
48 SetIcon(GetIcon(type), false); 49 SetIcon(GetIcon(type), false);
49 SetTitle(GetTitle(type)); 50 SetTitleAndFullName(title, title);
50 } 51 }
51 52
52 static gfx::ImageSkia GetIcon(Type type) { 53 static gfx::ImageSkia GetIcon(Type type) {
53 static const SkColor kColors[] = { 54 static const SkColor kColors[] = {
54 SK_ColorRED, 55 SK_ColorRED,
55 SK_ColorGREEN, 56 SK_ColorGREEN,
56 SK_ColorBLUE, 57 SK_ColorBLUE,
57 SK_ColorYELLOW, 58 SK_ColorYELLOW,
58 SK_ColorCYAN, 59 SK_ColorCYAN,
59 }; 60 };
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 }; 317 };
317 318
318 } // namespace 319 } // namespace
319 320
320 app_list::AppListViewDelegate* CreateAppListViewDelegate() { 321 app_list::AppListViewDelegate* CreateAppListViewDelegate() {
321 return new ExampleAppListViewDelegate; 322 return new ExampleAppListViewDelegate;
322 } 323 }
323 324
324 } // namespace shell 325 } // namespace shell
325 } // namespace ash 326 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/extension_app_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698