OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ppapi/proxy/video_encoder_resource.h" | 5 #include "ppapi/proxy/video_encoder_resource.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 using ppapi::proxy::ResourceMessageTestSink; | 27 using ppapi::proxy::ResourceMessageTestSink; |
28 | 28 |
29 namespace ppapi { | 29 namespace ppapi { |
30 namespace proxy { | 30 namespace proxy { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 class MockCompletionCallback { | 34 class MockCompletionCallback { |
35 public: | 35 public: |
36 MockCompletionCallback() : called_(false), call_event_(false, false) {} | 36 MockCompletionCallback() |
| 37 : called_(false), |
| 38 call_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 39 base::WaitableEvent::InitialState::NOT_SIGNALED) {} |
37 | 40 |
38 bool called() { return called_; } | 41 bool called() { return called_; } |
39 int32_t result() { return result_; } | 42 int32_t result() { return result_; } |
40 | 43 |
41 void WaitUntilCalled() { call_event_.Wait(); } | 44 void WaitUntilCalled() { call_event_.Wait(); } |
42 | 45 |
43 void Reset() { | 46 void Reset() { |
44 called_ = false; | 47 called_ = false; |
45 call_event_.Reset(); | 48 call_event_.Reset(); |
46 } | 49 } |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 ResourceMessageCallParams params; | 1148 ResourceMessageCallParams params; |
1146 uint32_t frame_id; | 1149 uint32_t frame_id; |
1147 bool force_frame; | 1150 bool force_frame; |
1148 ASSERT_TRUE(CheckEncodeMsg(¶ms, &frame_id, &force_frame)); | 1151 ASSERT_TRUE(CheckEncodeMsg(¶ms, &frame_id, &force_frame)); |
1149 SendEncodeReply(params, frame_id); | 1152 SendEncodeReply(params, frame_id); |
1150 } | 1153 } |
1151 } | 1154 } |
1152 | 1155 |
1153 } // namespace proxy | 1156 } // namespace proxy |
1154 } // namespace ppapi | 1157 } // namespace ppapi |
OLD | NEW |