OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/test/ui_test_utils.h" | 5 #include "chrome/test/ui_test_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 return true; | 155 return true; |
156 } | 156 } |
157 | 157 |
158 // DownloadItem::Observer | 158 // DownloadItem::Observer |
159 virtual void OnDownloadUpdated(DownloadItem* download) { | 159 virtual void OnDownloadUpdated(DownloadItem* download) { |
160 if (download->state() == DownloadItem::COMPLETE) { | 160 if (download->state() == DownloadItem::COMPLETE) { |
161 CheckAllDownloadsComplete(); | 161 CheckAllDownloadsComplete(); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
| 165 virtual void OnDownloadFileCompleted(DownloadItem* download) { } |
165 virtual void OnDownloadOpened(DownloadItem* download) {} | 166 virtual void OnDownloadOpened(DownloadItem* download) {} |
166 | 167 |
167 // DownloadManager::Observer | 168 // DownloadManager::Observer |
168 virtual void ModelChanged() { | 169 virtual void ModelChanged() { |
169 download_manager_->GetDownloads(this, L""); | 170 download_manager_->GetDownloads(this, L""); |
170 } | 171 } |
171 | 172 |
172 virtual void SetDownloads(std::vector<DownloadItem*>& downloads) { | 173 virtual void SetDownloads(std::vector<DownloadItem*>& downloads) { |
173 downloads_ = downloads; | 174 downloads_ = downloads; |
174 if (CheckAllDownloadsComplete()) | 175 if (CheckAllDownloadsComplete()) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 quit_loop_invoked_ = true; | 525 quit_loop_invoked_ = true; |
525 loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); | 526 loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); |
526 } | 527 } |
527 | 528 |
528 void TimedMessageLoopRunner::QuitAfter(int ms) { | 529 void TimedMessageLoopRunner::QuitAfter(int ms) { |
529 quit_loop_invoked_ = true; | 530 quit_loop_invoked_ = true; |
530 loop_->PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, ms); | 531 loop_->PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, ms); |
531 } | 532 } |
532 | 533 |
533 } // namespace ui_test_utils | 534 } // namespace ui_test_utils |
OLD | NEW |