| 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 "content/browser/media/capture/web_contents_video_capture_device.h" | 5 #include "content/browser/media/capture/web_contents_video_capture_device.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if (!quit_closure.is_null()) | 67 if (!quit_closure.is_null()) |
| 68 quit_closure.Run(); | 68 quit_closure.Run(); |
| 69 FAIL() << "Deadline exceeded while waiting, quitting"; | 69 FAIL() << "Deadline exceeded while waiting, quitting"; |
| 70 } else { | 70 } else { |
| 71 LOG(WARNING) << "Deadline exceeded; test would fail if debugger weren't " | 71 LOG(WARNING) << "Deadline exceeded; test would fail if debugger weren't " |
| 72 << "attached."; | 72 << "attached."; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 void RunCurrentLoopWithDeadline() { | 76 void RunCurrentLoopWithDeadline() { |
| 77 base::Timer deadline(false, false); | 77 base::OneShotTimer deadline; |
| 78 deadline.Start( | 78 deadline.Start( |
| 79 FROM_HERE, TestTimeouts::action_max_timeout(), | 79 FROM_HERE, TestTimeouts::action_max_timeout(), |
| 80 base::Bind(&DeadlineExceeded, | 80 base::Bind(&DeadlineExceeded, |
| 81 base::MessageLoop::current()->QuitWhenIdleClosure())); | 81 base::MessageLoop::current()->QuitWhenIdleClosure())); |
| 82 base::RunLoop().Run(); | 82 base::RunLoop().Run(); |
| 83 deadline.Stop(); | 83 deadline.Stop(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 SkColor ConvertRgbToYuv(SkColor rgb) { | 86 SkColor ConvertRgbToYuv(SkColor rgb) { |
| 87 uint8_t yuv[3]; | 87 uint8_t yuv[3]; |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 for (int i = 0; i < 3; ++i) { | 1034 for (int i = 0; i < 3; ++i) { |
| 1035 SimulateRefreshFrameRequest(); | 1035 SimulateRefreshFrameRequest(); |
| 1036 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); | 1036 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 device()->StopAndDeAllocate(); | 1039 device()->StopAndDeAllocate(); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 } // namespace | 1042 } // namespace |
| 1043 } // namespace content | 1043 } // namespace content |
| OLD | NEW |