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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 | 938 |
939 UpdateAccessibleName(); | 939 UpdateAccessibleName(); |
940 | 940 |
941 // Calling download()->OpenDownload may delete this, so this must be | 941 // Calling download()->OpenDownload may delete this, so this must be |
942 // the last thing we do. | 942 // the last thing we do. |
943 download()->OpenDownload(); | 943 download()->OpenDownload(); |
944 } | 944 } |
945 | 945 |
946 bool DownloadItemView::SubmitDownloadToFeedbackService() { | 946 bool DownloadItemView::SubmitDownloadToFeedbackService() { |
947 #if defined(FULL_SAFE_BROWSING) | 947 #if defined(FULL_SAFE_BROWSING) |
948 SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); | 948 safe_browsing::SafeBrowsingService* sb_service = |
| 949 g_browser_process->safe_browsing_service(); |
949 if (!sb_service) | 950 if (!sb_service) |
950 return false; | 951 return false; |
951 safe_browsing::DownloadProtectionService* download_protection_service = | 952 safe_browsing::DownloadProtectionService* download_protection_service = |
952 sb_service->download_protection_service(); | 953 sb_service->download_protection_service(); |
953 if (!download_protection_service) | 954 if (!download_protection_service) |
954 return false; | 955 return false; |
955 download_protection_service->feedback_service()->BeginFeedbackForDownload( | 956 download_protection_service->feedback_service()->BeginFeedbackForDownload( |
956 download()); | 957 download()); |
957 // WARNING: we are deleted at this point. Don't access 'this'. | 958 // WARNING: we are deleted at this point. Don't access 'this'. |
958 return true; | 959 return true; |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 void DownloadItemView::AnimateStateTransition(State from, State to, | 1389 void DownloadItemView::AnimateStateTransition(State from, State to, |
1389 gfx::SlideAnimation* animation) { | 1390 gfx::SlideAnimation* animation) { |
1390 if (from == NORMAL && to == HOT) { | 1391 if (from == NORMAL && to == HOT) { |
1391 animation->Show(); | 1392 animation->Show(); |
1392 } else if (from == HOT && to == NORMAL) { | 1393 } else if (from == HOT && to == NORMAL) { |
1393 animation->Hide(); | 1394 animation->Hide(); |
1394 } else if (from != to) { | 1395 } else if (from != to) { |
1395 animation->Reset((to == HOT) ? 1.0 : 0.0); | 1396 animation->Reset((to == HOT) ? 1.0 : 0.0); |
1396 } | 1397 } |
1397 } | 1398 } |
OLD | NEW |