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

Unified Diff: ui/ozone/platform/wayland/fake_server.h

Issue 2431123003: Revert of Use FileDescriptorWatcher in wl::FakeServer. (patchset #1 id:1 of https://codereview.chro… (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/wayland/fake_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/fake_server.h
diff --git a/ui/ozone/platform/wayland/fake_server.h b/ui/ozone/platform/wayland/fake_server.h
index fe97c2aef90d9b241aa3e4948e45b215ac99629d..8aa5e181ed851813e7455f3038b5edf385491fcd 100644
--- a/ui/ozone/platform/wayland/fake_server.h
+++ b/ui/ozone/platform/wayland/fake_server.h
@@ -7,10 +7,8 @@
#include <wayland-server-core.h>
-#include <memory>
-
#include "base/bind.h"
-#include "base/files/file_descriptor_watcher_posix.h"
+#include "base/message_loop/message_pump_libevent.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -184,7 +182,7 @@ struct DisplayDeleter {
void operator()(wl_display* display);
};
-class FakeServer : public base::Thread {
+class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
public:
FakeServer();
~FakeServer() override;
@@ -215,9 +213,11 @@ class FakeServer : public base::Thread {
private:
void DoPause();
- void StartWatchingFileDescriptor();
+ std::unique_ptr<base::MessagePump> CreateMessagePump();
- void OnFileCanReadWithoutBlocking();
+ // base::MessagePumpLibevent::Watcher
+ void OnFileCanReadWithoutBlocking(int fd) override;
+ void OnFileCanWriteWithoutBlocking(int fd) override;
std::unique_ptr<wl_display, DisplayDeleter> display_;
wl_client* client_ = nullptr;
@@ -232,7 +232,7 @@ class FakeServer : public base::Thread {
MockSeat seat_;
MockXdgShell xdg_shell_;
- std::unique_ptr<base::FileDescriptorWatcher::Controller> controller_;
+ base::MessagePumpLibevent::FileDescriptorWatcher controller_;
DISALLOW_COPY_AND_ASSIGN(FakeServer);
};
« no previous file with comments | « no previous file | ui/ozone/platform/wayland/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698