| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 WindowTypeLauncherItem::Type type = | 197 WindowTypeLauncherItem::Type type = |
| 198 static_cast<WindowTypeLauncherItem::Type>(i); | 198 static_cast<WindowTypeLauncherItem::Type>(i); |
| 199 apps->Add(new WindowTypeLauncherItem(type)); | 199 apps->Add(new WindowTypeLauncherItem(type)); |
| 200 } | 200 } |
| 201 } | 201 } |
| 202 | 202 |
| 203 gfx::ImageSkia CreateSearchBoxIcon() { | 203 gfx::ImageSkia CreateSearchBoxIcon() { |
| 204 const base::string16 icon_text = ASCIIToUTF16("ash"); | 204 const base::string16 icon_text = ASCIIToUTF16("ash"); |
| 205 const gfx::Size icon_size(32, 32); | 205 const gfx::Size icon_size(32, 32); |
| 206 | 206 |
| 207 gfx::Canvas canvas(icon_size, ui::SCALE_FACTOR_100P, | 207 gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */); |
| 208 false /* is_opaque */); | |
| 209 canvas.DrawStringInt(icon_text, | 208 canvas.DrawStringInt(icon_text, |
| 210 gfx::Font(), | 209 gfx::Font(), |
| 211 SK_ColorBLACK, | 210 SK_ColorBLACK, |
| 212 0, 0, icon_size.width(), icon_size.height(), | 211 0, 0, icon_size.width(), icon_size.height(), |
| 213 gfx::Canvas::TEXT_ALIGN_CENTER | | 212 gfx::Canvas::TEXT_ALIGN_CENTER | |
| 214 gfx::Canvas::NO_SUBPIXEL_RENDERING); | 213 gfx::Canvas::NO_SUBPIXEL_RENDERING); |
| 215 | 214 |
| 216 return gfx::ImageSkia(canvas.ExtractImageRep()); | 215 return gfx::ImageSkia(canvas.ExtractImageRep()); |
| 217 } | 216 } |
| 218 | 217 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 }; | 323 }; |
| 325 | 324 |
| 326 } // namespace | 325 } // namespace |
| 327 | 326 |
| 328 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 327 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
| 329 return new ExampleAppListViewDelegate; | 328 return new ExampleAppListViewDelegate; |
| 330 } | 329 } |
| 331 | 330 |
| 332 } // namespace shell | 331 } // namespace shell |
| 333 } // namespace ash | 332 } // namespace ash |
| OLD | NEW |