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

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

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler 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 | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_item_delegate_manager.cc ('k') | ash/shell/window_watcher.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ash/launcher/launcher_item_delegate_manager.cc ('k') | ash/shell/window_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698