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

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

Issue 1712103002: ozone/platform/wayland: Implement pointer handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 | « ui/ozone/platform/wayland/BUILD.gn ('k') | 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 5c5b471e4ee87d1f406e96cdf700c346b27eeb00..a47c8752a92e3e85e5ad9565bc327f78502ca793 100644
--- a/ui/ozone/platform/wayland/fake_server.h
+++ b/ui/ozone/platform/wayland/fake_server.h
@@ -71,6 +71,15 @@ class MockSurface : public ServerObject {
DISALLOW_COPY_AND_ASSIGN(MockSurface);
};
+class MockPointer : public ServerObject {
+ public:
+ MockPointer(wl_resource* resource);
+ ~MockPointer() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockPointer);
+};
+
struct GlobalDeleter {
void operator()(wl_global* global);
};
@@ -118,6 +127,17 @@ class MockCompositor : public Global {
DISALLOW_COPY_AND_ASSIGN(MockCompositor);
};
+class MockSeat : public Global {
+ public:
+ MockSeat();
+ ~MockSeat() override;
+
+ scoped_ptr<MockPointer> pointer;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSeat);
+};
+
class MockXdgShell : public Global {
public:
MockXdgShell();
@@ -158,6 +178,7 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
return resource ? T::FromResource(resource) : nullptr;
}
+ MockSeat* seat() { return &seat_; }
MockXdgShell* xdg_shell() { return &xdg_shell_; }
private:
@@ -178,6 +199,7 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
bool paused_ = false;
MockCompositor compositor_;
+ MockSeat seat_;
MockXdgShell xdg_shell_;
base::MessagePumpLibevent::FileDescriptorWatcher controller_;
« no previous file with comments | « ui/ozone/platform/wayland/BUILD.gn ('k') | ui/ozone/platform/wayland/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698