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 "chrome/browser/ui/views/download/download_item_view.h" | 5 #include "chrome/browser/ui/views/download/download_item_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/download/download_util.h" | 23 #include "chrome/browser/download/download_util.h" |
24 #include "chrome/browser/safe_browsing/download_feedback_service.h" | 24 #include "chrome/browser/safe_browsing/download_feedback_service.h" |
25 #include "chrome/browser/safe_browsing/download_protection_service.h" | 25 #include "chrome/browser/safe_browsing/download_protection_service.h" |
26 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 26 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
27 #include "chrome/browser/themes/theme_properties.h" | 27 #include "chrome/browser/themes/theme_properties.h" |
28 #include "chrome/browser/ui/views/download/download_shelf_context_menu_view.h" | 28 #include "chrome/browser/ui/views/download/download_shelf_context_menu_view.h" |
29 #include "chrome/browser/ui/views/download/download_shelf_view.h" | 29 #include "chrome/browser/ui/views/download/download_shelf_view.h" |
30 #include "content/public/browser/download_danger_type.h" | 30 #include "content/public/browser/download_danger_type.h" |
31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
32 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
33 #include "third_party/icu/public/common/unicode/uchar.h" | 33 #include "third_party/icu/source/common/unicode/uchar.h" |
34 #include "ui/base/accessibility/accessible_view_state.h" | 34 #include "ui/base/accessibility/accessible_view_state.h" |
35 #include "ui/base/animation/slide_animation.h" | 35 #include "ui/base/animation/slide_animation.h" |
36 #include "ui/base/events/event.h" | 36 #include "ui/base/events/event.h" |
37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
38 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
39 #include "ui/base/text/text_elider.h" | 39 #include "ui/base/text/text_elider.h" |
40 #include "ui/base/theme_provider.h" | 40 #include "ui/base/theme_provider.h" |
41 #include "ui/gfx/canvas.h" | 41 #include "ui/gfx/canvas.h" |
42 #include "ui/gfx/color_utils.h" | 42 #include "ui/gfx/color_utils.h" |
43 #include "ui/gfx/image/image.h" | 43 #include "ui/gfx/image/image.h" |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 void DownloadItemView::AnimateStateTransition(State from, State to, | 1242 void DownloadItemView::AnimateStateTransition(State from, State to, |
1243 ui::SlideAnimation* animation) { | 1243 ui::SlideAnimation* animation) { |
1244 if (from == NORMAL && to == HOT) { | 1244 if (from == NORMAL && to == HOT) { |
1245 animation->Show(); | 1245 animation->Show(); |
1246 } else if (from == HOT && to == NORMAL) { | 1246 } else if (from == HOT && to == NORMAL) { |
1247 animation->Hide(); | 1247 animation->Hide(); |
1248 } else if (from != to) { | 1248 } else if (from != to) { |
1249 animation->Reset((to == HOT) ? 1.0 : 0.0); | 1249 animation->Reset((to == HOT) ? 1.0 : 0.0); |
1250 } | 1250 } |
1251 } | 1251 } |
OLD | NEW |