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

Side by Side Diff: ui/accelerated_widget_mac/window_resize_helper_mac.cc

Issue 2056443002: Manual refactor to enum-based WaitableEvent for remaining mac/ios files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_1_explicit_bools
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 | « media/audio/mac/audio_auhal_mac_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 "ui/accelerated_widget_mac/window_resize_helper_mac.h" 5 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <list> 9 #include <list>
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 pumpable_task_runner_ = NULL; 169 pumpable_task_runner_ = NULL;
170 } 170 }
171 171
172 //////////////////////////////////////////////////////////////////////////////// 172 ////////////////////////////////////////////////////////////////////////////////
173 // PumpableTaskRunner 173 // PumpableTaskRunner
174 174
175 PumpableTaskRunner::PumpableTaskRunner( 175 PumpableTaskRunner::PumpableTaskRunner(
176 const EventTimedWaitCallback& event_timed_wait_callback, 176 const EventTimedWaitCallback& event_timed_wait_callback,
177 const scoped_refptr<base::SingleThreadTaskRunner>& target_task_runner) 177 const scoped_refptr<base::SingleThreadTaskRunner>& target_task_runner)
178 : event_(false /* auto-reset */, false /* initially signalled */), 178 : event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
179 base::WaitableEvent::InitialState::NOT_SIGNALED),
179 event_timed_wait_callback_(event_timed_wait_callback), 180 event_timed_wait_callback_(event_timed_wait_callback),
180 target_task_runner_(target_task_runner) {} 181 target_task_runner_(target_task_runner) {}
181 182
182 PumpableTaskRunner::~PumpableTaskRunner() { 183 PumpableTaskRunner::~PumpableTaskRunner() {
183 // Because tasks hold a reference to the task runner, the task queue must 184 // Because tasks hold a reference to the task runner, the task queue must
184 // be empty when it is destroyed. 185 // be empty when it is destroyed.
185 DCHECK(task_queue_.empty()); 186 DCHECK(task_queue_.empty());
186 } 187 }
187 188
188 bool PumpableTaskRunner::WaitForSingleWrappedTaskToRun( 189 bool PumpableTaskRunner::WaitForSingleWrappedTaskToRun(
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 WindowResizeHelperMac::WindowResizeHelperMac() {} 313 WindowResizeHelperMac::WindowResizeHelperMac() {}
313 WindowResizeHelperMac::~WindowResizeHelperMac() {} 314 WindowResizeHelperMac::~WindowResizeHelperMac() {}
314 315
315 void WindowResizeHelperMac::EventTimedWait(base::WaitableEvent* event, 316 void WindowResizeHelperMac::EventTimedWait(base::WaitableEvent* event,
316 base::TimeDelta delay) { 317 base::TimeDelta delay) {
317 base::ThreadRestrictions::ScopedAllowWait allow_wait; 318 base::ThreadRestrictions::ScopedAllowWait allow_wait;
318 event->TimedWait(delay); 319 event->TimedWait(delay);
319 } 320 }
320 321
321 } // namespace ui 322 } // namespace ui
OLDNEW
« no previous file with comments | « media/audio/mac/audio_auhal_mac_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698