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

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

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 void DisplayDeleter::operator()(wl_display* display) { 349 void DisplayDeleter::operator()(wl_display* display) {
350 wl_display_destroy(display); 350 wl_display_destroy(display);
351 } 351 }
352 352
353 FakeServer::FakeServer() 353 FakeServer::FakeServer()
354 : Thread("fake_wayland_server"), 354 : Thread("fake_wayland_server"),
355 pause_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC, 355 pause_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
356 base::WaitableEvent::InitialState::NOT_SIGNALED), 356 base::WaitableEvent::InitialState::NOT_SIGNALED),
357 resume_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC, 357 resume_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
358 base::WaitableEvent::InitialState::NOT_SIGNALED) {} 358 base::WaitableEvent::InitialState::NOT_SIGNALED),
359 controller_(FROM_HERE) {}
359 360
360 FakeServer::~FakeServer() { 361 FakeServer::~FakeServer() {
361 Resume(); 362 Resume();
362 Stop(); 363 Stop();
363 } 364 }
364 365
365 bool FakeServer::Start() { 366 bool FakeServer::Start() {
366 display_.reset(wl_display_create()); 367 display_.reset(wl_display_create());
367 if (!display_) 368 if (!display_)
368 return false; 369 return false;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 429 }
429 430
430 void FakeServer::OnFileCanReadWithoutBlocking(int fd) { 431 void FakeServer::OnFileCanReadWithoutBlocking(int fd) {
431 wl_event_loop_dispatch(event_loop_, 0); 432 wl_event_loop_dispatch(event_loop_, 0);
432 wl_display_flush_clients(display_.get()); 433 wl_display_flush_clients(display_.get());
433 } 434 }
434 435
435 void FakeServer::OnFileCanWriteWithoutBlocking(int fd) {} 436 void FakeServer::OnFileCanWriteWithoutBlocking(int fd) {}
436 437
437 } // namespace wl 438 } // namespace wl
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.cc ('k') | ui/ozone/platform/wayland/wayland_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698