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

Side by Side Diff: ui/ozone/platform/wayland/fake_server.cc

Issue 2054613002: Manual refactor of few more stragglers to enum-based WaitableEvent constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_3_webkit
Patch Set: caught one more with event_\( instead of _event_\( 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 | « tools/ipc_fuzzer/message_replay/replay_process.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ozone/platform/wayland/fake_server.h" 5 #include "ui/ozone/platform/wayland/fake_server.h"
6 6
7 #include <sys/socket.h> 7 #include <sys/socket.h>
8 #include <wayland-server.h> 8 #include <wayland-server.h>
9 #include <xdg-shell-unstable-v5-server-protocol.h> 9 #include <xdg-shell-unstable-v5-server-protocol.h>
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 : Global(&xdg_shell_interface, &xdg_shell_impl, kXdgShellVersion) {} 304 : Global(&xdg_shell_interface, &xdg_shell_impl, kXdgShellVersion) {}
305 305
306 MockXdgShell::~MockXdgShell() {} 306 MockXdgShell::~MockXdgShell() {}
307 307
308 void DisplayDeleter::operator()(wl_display* display) { 308 void DisplayDeleter::operator()(wl_display* display) {
309 wl_display_destroy(display); 309 wl_display_destroy(display);
310 } 310 }
311 311
312 FakeServer::FakeServer() 312 FakeServer::FakeServer()
313 : Thread("fake_wayland_server"), 313 : Thread("fake_wayland_server"),
314 pause_event_(false, false), 314 pause_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
315 resume_event_(false, false) {} 315 base::WaitableEvent::InitialState::NOT_SIGNALED),
316 resume_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
317 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
316 318
317 FakeServer::~FakeServer() { 319 FakeServer::~FakeServer() {
318 Resume(); 320 Resume();
319 Stop(); 321 Stop();
320 } 322 }
321 323
322 bool FakeServer::Start() { 324 bool FakeServer::Start() {
323 display_.reset(wl_display_create()); 325 display_.reset(wl_display_create());
324 if (!display_) 326 if (!display_)
325 return false; 327 return false;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 385 }
384 386
385 void FakeServer::OnFileCanReadWithoutBlocking(int fd) { 387 void FakeServer::OnFileCanReadWithoutBlocking(int fd) {
386 wl_event_loop_dispatch(event_loop_, 0); 388 wl_event_loop_dispatch(event_loop_, 0);
387 wl_display_flush_clients(display_.get()); 389 wl_display_flush_clients(display_.get());
388 } 390 }
389 391
390 void FakeServer::OnFileCanWriteWithoutBlocking(int fd) {} 392 void FakeServer::OnFileCanWriteWithoutBlocking(int fd) {}
391 393
392 } // namespace wl 394 } // namespace wl
OLDNEW
« no previous file with comments | « tools/ipc_fuzzer/message_replay/replay_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698