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

Unified Diff: components/exo/test/exo_test_helper.h

Issue 2562803002: exo: Replace pointer based stylus and replace with touch based stylus (Closed)
Patch Set: updated deps in gn file Created 4 years 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 | « components/exo/pointer_unittest.cc ('k') | components/exo/test/exo_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/test/exo_test_helper.h
diff --git a/components/exo/test/exo_test_helper.h b/components/exo/test/exo_test_helper.h
index 2d00476488684d64fdd09f85e18f8a016ff9f330..11bc8d7885662e1dd0a17a9319b38c7b801e953c 100644
--- a/components/exo/test/exo_test_helper.h
+++ b/components/exo/test/exo_test_helper.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
namespace gfx {
@@ -16,8 +17,29 @@ class GpuMemoryBuffer;
}
namespace exo {
+class Buffer;
+class Surface;
+class ShellSurface;
+
namespace test {
+class ExoTestWindow {
+ public:
+ ExoTestWindow(std::unique_ptr<gfx::GpuMemoryBuffer> gpu_buffer,
+ bool is_modal);
+ ExoTestWindow(ExoTestWindow&& window);
+ virtual ~ExoTestWindow();
+
+ Surface* surface() { return surface_.get(); }
+ ShellSurface* shell_surface() { return shell_surface_.get(); }
+ gfx::Point origin();
+
+ private:
+ std::unique_ptr<Surface> surface_;
+ std::unique_ptr<Buffer> buffer_;
+ std::unique_ptr<ShellSurface> shell_surface_;
+};
+
// A helper class that does common initialization required for Exosphere.
class ExoTestHelper {
public:
@@ -28,6 +50,9 @@ class ExoTestHelper {
std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
const gfx::Size& size);
+ // Creates window of size (width, height) at center of screen.
+ ExoTestWindow CreateWindow(int width, int height, bool is_modal);
+
private:
DISALLOW_COPY_AND_ASSIGN(ExoTestHelper);
};
« no previous file with comments | « components/exo/pointer_unittest.cc ('k') | components/exo/test/exo_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698