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

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

Issue 11362070: Remove unused custom vertical text alignment in CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 8 years, 1 month 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 | ui/gfx/canvas.h » ('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/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/example_factory.h" 8 #include "ash/shell/example_factory.h"
9 #include "ash/shell/toplevel_window.h" 9 #include "ash/shell/toplevel_window.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 const string16 icon_text = ASCIIToUTF16("ash"); 203 const string16 icon_text = ASCIIToUTF16("ash");
204 const gfx::Size icon_size(32, 32); 204 const gfx::Size icon_size(32, 32);
205 205
206 gfx::Canvas canvas(icon_size, ui::SCALE_FACTOR_100P, 206 gfx::Canvas canvas(icon_size, ui::SCALE_FACTOR_100P,
207 false /* is_opaque */); 207 false /* is_opaque */);
208 canvas.DrawStringInt(icon_text, 208 canvas.DrawStringInt(icon_text,
209 gfx::Font(), 209 gfx::Font(),
210 SK_ColorBLACK, 210 SK_ColorBLACK,
211 0, 0, icon_size.width(), icon_size.height(), 211 0, 0, icon_size.width(), icon_size.height(),
212 gfx::Canvas::TEXT_ALIGN_CENTER | 212 gfx::Canvas::TEXT_ALIGN_CENTER |
213 gfx::Canvas::TEXT_VALIGN_MIDDLE |
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
219 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) { 218 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) {
220 search_box_model->SetIcon(CreateSearchBoxIcon()); 219 search_box_model->SetIcon(CreateSearchBoxIcon());
221 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); 220 search_box_model->SetHintText(ASCIIToUTF16("Type to search..."));
222 } 221 }
223 222
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 }; 292 };
294 293
295 } // namespace 294 } // namespace
296 295
297 app_list::AppListViewDelegate* CreateAppListViewDelegate() { 296 app_list::AppListViewDelegate* CreateAppListViewDelegate() {
298 return new ExampleAppListViewDelegate; 297 return new ExampleAppListViewDelegate;
299 } 298 }
300 299
301 } // namespace shell 300 } // namespace shell
302 } // namespace ash 301 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698