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/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "ui/views/background.h" | 32 #include "ui/views/background.h" |
33 #include "ui/views/controls/image_view.h" | 33 #include "ui/views/controls/image_view.h" |
34 #include "ui/views/controls/label.h" | 34 #include "ui/views/controls/label.h" |
35 #include "ui/views/controls/menu/menu_runner.h" | 35 #include "ui/views/controls/menu/menu_runner.h" |
36 #include "ui/views/drag_controller.h" | 36 #include "ui/views/drag_controller.h" |
37 | 37 |
38 namespace app_list { | 38 namespace app_list { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 const int kTopPadding = 20; | 42 const int kTopPadding = 18; |
43 const int kIconTitleSpacing = 7; | 43 const int kIconTitleSpacing = 6; |
44 const int kProgressBarHorizontalPadding = 12; | 44 const int kProgressBarHorizontalPadding = 12; |
45 | 45 |
46 // Radius of the folder dropping preview circle. | 46 // Radius of the folder dropping preview circle. |
47 const int kFolderPreviewRadius = 40; | 47 const int kFolderPreviewRadius = 40; |
48 | 48 |
49 const int kLeftRightPaddingChars = 1; | 49 const int kLeftRightPaddingChars = 1; |
50 | 50 |
51 // Scale to transform the icon when a drag starts. | 51 // Scale to transform the icon when a drag starts. |
52 const float kDraggingIconScale = 1.5f; | 52 const float kDraggingIconScale = 1.5f; |
53 | 53 |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 SetItemPercentDownloaded(item_weak_->percent_downloaded()); | 571 SetItemPercentDownloaded(item_weak_->percent_downloaded()); |
572 } | 572 } |
573 | 573 |
574 void AppListItemView::ItemBeingDestroyed() { | 574 void AppListItemView::ItemBeingDestroyed() { |
575 DCHECK(item_weak_); | 575 DCHECK(item_weak_); |
576 item_weak_->RemoveObserver(this); | 576 item_weak_->RemoveObserver(this); |
577 item_weak_ = NULL; | 577 item_weak_ = NULL; |
578 } | 578 } |
579 | 579 |
580 } // namespace app_list | 580 } // namespace app_list |
OLD | NEW |