| 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" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/i18n/break_iterator.h" | 13 #include "base/i18n/break_iterator.h" |
| 14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
| 15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 16 #include "base/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "base/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 18 #include "base/strings/sys_string_conversions.h" | 18 #include "base/strings/sys_string_conversions.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 21 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 22 #include "chrome/browser/download/download_item_model.h" | 22 #include "chrome/browser/download/download_item_model.h" |
| 23 #include "chrome/browser/download/download_util.h" | 23 #include "chrome/browser/download/download_util.h" |
| 24 #include "chrome/browser/themes/theme_properties.h" | 24 #include "chrome/browser/themes/theme_properties.h" |
| 25 #include "chrome/browser/ui/views/download/download_shelf_context_menu_view.h" | 25 #include "chrome/browser/ui/views/download/download_shelf_context_menu_view.h" |
| 26 #include "chrome/browser/ui/views/download/download_shelf_view.h" | 26 #include "chrome/browser/ui/views/download/download_shelf_view.h" |
| 27 #include "content/public/browser/download_danger_type.h" | 27 #include "content/public/browser/download_danger_type.h" |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 void DownloadItemView::AnimateStateTransition(State from, State to, | 1210 void DownloadItemView::AnimateStateTransition(State from, State to, |
| 1211 ui::SlideAnimation* animation) { | 1211 ui::SlideAnimation* animation) { |
| 1212 if (from == NORMAL && to == HOT) { | 1212 if (from == NORMAL && to == HOT) { |
| 1213 animation->Show(); | 1213 animation->Show(); |
| 1214 } else if (from == HOT && to == NORMAL) { | 1214 } else if (from == HOT && to == NORMAL) { |
| 1215 animation->Hide(); | 1215 animation->Hide(); |
| 1216 } else if (from != to) { | 1216 } else if (from != to) { |
| 1217 animation->Reset((to == HOT) ? 1.0 : 0.0); | 1217 animation->Reset((to == HOT) ? 1.0 : 0.0); |
| 1218 } | 1218 } |
| 1219 } | 1219 } |
| OLD | NEW |