| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 void DownloadItemView::UpdateDownloadProgress() { | 308 void DownloadItemView::UpdateDownloadProgress() { |
| 309 progress_angle_ = (progress_angle_ + | 309 progress_angle_ = (progress_angle_ + |
| 310 download_util::kUnknownIncrementDegrees) % | 310 download_util::kUnknownIncrementDegrees) % |
| 311 download_util::kMaxDegrees; | 311 download_util::kMaxDegrees; |
| 312 SchedulePaint(); | 312 SchedulePaint(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void DownloadItemView::StartDownloadProgress() { | 315 void DownloadItemView::StartDownloadProgress() { |
| 316 if (progress_timer_.IsRunning()) | 316 if (progress_timer_.IsRunning()) |
| 317 return; | 317 return; |
| 318 progress_timer_.Start(FROM_HERE, | 318 progress_timer_.Start( |
| 319 base::TimeDelta::FromMilliseconds(download_util::kProgressRateMs), this, | 319 base::TimeDelta::FromMilliseconds(download_util::kProgressRateMs), this, |
| 320 &DownloadItemView::UpdateDownloadProgress); | 320 &DownloadItemView::UpdateDownloadProgress); |
| 321 } | 321 } |
| 322 | 322 |
| 323 void DownloadItemView::StopDownloadProgress() { | 323 void DownloadItemView::StopDownloadProgress() { |
| 324 progress_timer_.Stop(); | 324 progress_timer_.Stop(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void DownloadItemView::OnExtractIconComplete(IconManager::Handle handle, | 327 void DownloadItemView::OnExtractIconComplete(IconManager::Handle handle, |
| 328 gfx::Image* icon_bitmap) { | 328 gfx::Image* icon_bitmap) { |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 // If the name has changed, notify assistive technology that the name | 1117 // If the name has changed, notify assistive technology that the name |
| 1118 // has changed so they can announce it immediately. | 1118 // has changed so they can announce it immediately. |
| 1119 if (new_name != accessible_name_) { | 1119 if (new_name != accessible_name_) { |
| 1120 accessible_name_ = new_name; | 1120 accessible_name_ = new_name; |
| 1121 if (GetWidget()) { | 1121 if (GetWidget()) { |
| 1122 GetWidget()->NotifyAccessibilityEvent( | 1122 GetWidget()->NotifyAccessibilityEvent( |
| 1123 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); | 1123 this, ui::AccessibilityTypes::EVENT_NAME_CHANGED, true); |
| 1124 } | 1124 } |
| 1125 } | 1125 } |
| 1126 } | 1126 } |
| OLD | NEW |