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