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 8608e1e8e948fd4a7def0bb54bd96ad3cd2152ab..1f9af036863c014eb64b6601ce31380c6583c838 100644 |
--- a/ui/ozone/platform/wayland/fake_server.h |
+++ b/ui/ozone/platform/wayland/fake_server.h |
@@ -12,6 +12,7 @@ |
#include "base/synchronization/waitable_event.h" |
#include "base/threading/thread.h" |
#include "testing/gmock/include/gmock/gmock.h" |
+#include "ui/gfx/geometry/rect.h" |
struct wl_client; |
struct wl_display; |
@@ -92,6 +93,7 @@ class Global { |
virtual ~Global(); |
bool Initialize(wl_display* display); |
+ virtual void OnBind() {} |
rjkroege
2016/07/25 23:45:46
Method docs? My dream is to have docs approaching
joone
2016/09/21 21:21:22
Done.
|
// The first bound resource to this global, which is usually all that is |
// useful when testing a simple client. |
@@ -127,6 +129,20 @@ class MockCompositor : public Global { |
DISALLOW_COPY_AND_ASSIGN(MockCompositor); |
}; |
+class MockOutput : public Global { |
rjkroege
2016/07/25 23:45:46
Say what Global is please.
joone
2016/09/21 21:21:22
Done.
|
+ public: |
+ MockOutput(); |
+ ~MockOutput() override; |
+ void SetRect(const gfx::Rect rect) { rect_ = rect; } |
+ const gfx::Rect GetRect() { return rect_; } |
+ void OnBind() override; |
+ |
+ private: |
+ gfx::Rect rect_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MockOutput); |
+}; |
+ |
class MockSeat : public Global { |
public: |
MockSeat(); |
@@ -180,6 +196,7 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher { |
MockSeat* seat() { return &seat_; } |
MockXdgShell* xdg_shell() { return &xdg_shell_; } |
+ MockOutput* output() { return &output_; } |
private: |
void DoPause(); |
@@ -198,6 +215,7 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher { |
base::WaitableEvent resume_event_; |
MockCompositor compositor_; |
+ MockOutput output_; |
MockSeat seat_; |
MockXdgShell xdg_shell_; |