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

Side by Side Diff: ui/app_list/views/app_list_item_view.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, 2 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
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 "ui/app_list/views/app_list_item_view.h" 5 #include "ui/app_list/views/app_list_item_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void AppListItemView::Prerender() { 177 void AppListItemView::Prerender() {
178 title_->PaintToBackingImage(); 178 title_->PaintToBackingImage();
179 } 179 }
180 180
181 void AppListItemView::CancelContextMenu() { 181 void AppListItemView::CancelContextMenu() {
182 if (context_menu_runner_) 182 if (context_menu_runner_)
183 context_menu_runner_->Cancel(); 183 context_menu_runner_->Cancel();
184 } 184 }
185 185
186 gfx::ImageSkia AppListItemView::GetDragImage() { 186 gfx::ImageSkia AppListItemView::GetDragImage() {
187 gfx::Canvas canvas(size(), ui::SCALE_FACTOR_100P, false /* is_opaque */); 187 gfx::Canvas canvas(size(), 1.0f, false /* is_opaque */);
188 gfx::Rect bounds(size()); 188 gfx::Rect bounds(size());
189 canvas.DrawColor(SK_ColorTRANSPARENT); 189 canvas.DrawColor(SK_ColorTRANSPARENT);
190 PaintChildren(&canvas); 190 PaintChildren(&canvas);
191 return gfx::ImageSkia(canvas.ExtractImageRep()); 191 return gfx::ImageSkia(canvas.ExtractImageRep());
192 } 192 }
193 193
194 void AppListItemView::ItemIconChanged() { 194 void AppListItemView::ItemIconChanged() {
195 UpdateIcon(); 195 UpdateIcon();
196 } 196 }
197 197
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 SetTouchDragging(false); 405 SetTouchDragging(false);
406 break; 406 break;
407 default: 407 default:
408 break; 408 break;
409 } 409 }
410 if (!event->handled()) 410 if (!event->handled())
411 CustomButton::OnGestureEvent(event); 411 CustomButton::OnGestureEvent(event);
412 } 412 }
413 413
414 } // namespace app_list 414 } // namespace app_list
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | ui/app_list/views/app_list_main_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698