summaryrefslogtreecommitdiffstats
path: root/views/widget/widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'views/widget/widget.h')
-rw-r--r--views/widget/widget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h
index 9af8da2..463f547 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -464,6 +464,12 @@ class Widget : public internal::NativeWidgetDelegate,
return non_client_view()->client_view();
}
+#if defined(UNIT_TEST)
+ static void set_compositor_factory(ui::Compositor*(*factory)()) {
+ factory_ = factory;
+ }
+#endif
+
const ui::Compositor* compositor() const { return compositor_.get(); }
ui::Compositor* compositor() { return compositor_.get(); }
@@ -636,6 +642,9 @@ class Widget : public internal::NativeWidgetDelegate,
// The smallest size the window can be.
gfx::Size minimum_size_;
+ // Factory used to create Compositors. Settable by tests.
+ static ui::Compositor*(*factory_)();
+
DISALLOW_COPY_AND_ASSIGN(Widget);
};