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

Unified Diff: ui/compositor/test/test_compositor_host_ozone.cc

Issue 285373012: Temporarily adds another constructor to Compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak Created 6 years, 7 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/compositor/test/test_compositor_host_mac.mm ('k') | ui/compositor/test/test_compositor_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/test_compositor_host_ozone.cc
diff --git a/ui/compositor/test/test_compositor_host_ozone.cc b/ui/compositor/test/test_compositor_host_ozone.cc
index 78431bee417d94da5d4cb54a74cc68993ad7a164..1c7a8da9aca45026ed63ff0ac725e782b288430b 100644
--- a/ui/compositor/test/test_compositor_host_ozone.cc
+++ b/ui/compositor/test/test_compositor_host_ozone.cc
@@ -18,7 +18,8 @@ namespace ui {
class TestCompositorHostOzone : public TestCompositorHost {
public:
- TestCompositorHostOzone(const gfx::Rect& bounds);
+ TestCompositorHostOzone(const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory);
virtual ~TestCompositorHostOzone();
private:
@@ -30,13 +31,18 @@ class TestCompositorHostOzone : public TestCompositorHost {
gfx::Rect bounds_;
+ ui::ContextFactory* context_factory_;
+
scoped_ptr<ui::Compositor> compositor_;
DISALLOW_COPY_AND_ASSIGN(TestCompositorHostOzone);
};
-TestCompositorHostOzone::TestCompositorHostOzone(const gfx::Rect& bounds)
- : bounds_(bounds) {}
+TestCompositorHostOzone::TestCompositorHostOzone(
+ const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory)
+ : bounds_(bounds),
+ context_factory_(context_factory) {}
TestCompositorHostOzone::~TestCompositorHostOzone() {}
@@ -48,7 +54,7 @@ void TestCompositorHostOzone::Show() {
// with a non-0 widget.
// TODO(rjkroege): Use a "real" ozone widget when it is
// available: http://crbug.com/255128
- compositor_.reset(new ui::Compositor(1));
+ compositor_.reset(new ui::Compositor(1, context_factory_));
compositor_->SetScaleAndSize(1.0f, bounds_.size());
}
@@ -62,8 +68,10 @@ void TestCompositorHostOzone::Draw() {
}
// static
-TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
- return new TestCompositorHostOzone(bounds);
+TestCompositorHost* TestCompositorHost::Create(
+ const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory) {
+ return new TestCompositorHostOzone(bounds, context_factory);
}
} // namespace ui
« no previous file with comments | « ui/compositor/test/test_compositor_host_mac.mm ('k') | ui/compositor/test/test_compositor_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698