| OLD | NEW |
| 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 Loading... |
| 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 SetName(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 Loading... |
| 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 |
| OLD | NEW |