Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: ppapi/proxy/video_encoder_resource_unittest.cc

Issue 2027313002: Migrate WaitableEvent to enum-based constructor in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/tracked_callback_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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(&params, &frame_id, &force_frame)); 1151 ASSERT_TRUE(CheckEncodeMsg(&params, &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
OLDNEW
« no previous file with comments | « ppapi/proxy/tracked_callback_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698