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

Unified Diff: ui/compositor/test/test_compositor_host_x11.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_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/test_compositor_host_x11.cc
diff --git a/ui/compositor/test/test_compositor_host_x11.cc b/ui/compositor/test/test_compositor_host_x11.cc
index 4215e276d619e84eef3f25da533dbb65376150ba..4b940cbd2d7f5de9bebb8b09f71ffb072af052c7 100644
--- a/ui/compositor/test/test_compositor_host_x11.cc
+++ b/ui/compositor/test/test_compositor_host_x11.cc
@@ -21,7 +21,8 @@ namespace ui {
class TestCompositorHostX11 : public TestCompositorHost {
public:
- TestCompositorHostX11(const gfx::Rect& bounds);
+ TestCompositorHostX11(const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory);
virtual ~TestCompositorHostX11();
private:
@@ -33,6 +34,8 @@ class TestCompositorHostX11 : public TestCompositorHost {
gfx::Rect bounds_;
+ ui::ContextFactory* context_factory_;
+
scoped_ptr<ui::Compositor> compositor_;
XID window_;
@@ -40,8 +43,11 @@ class TestCompositorHostX11 : public TestCompositorHost {
DISALLOW_COPY_AND_ASSIGN(TestCompositorHostX11);
};
-TestCompositorHostX11::TestCompositorHostX11(const gfx::Rect& bounds)
- : bounds_(bounds) {
+TestCompositorHostX11::TestCompositorHostX11(
+ const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory)
+ : bounds_(bounds),
+ context_factory_(context_factory) {
}
TestCompositorHostX11::~TestCompositorHostX11() {
@@ -69,7 +75,7 @@ void TestCompositorHostX11::Show() {
if (event.type == MapNotify && event.xmap.window == window_)
break;
}
- compositor_.reset(new ui::Compositor(window_));
+ compositor_.reset(new ui::Compositor(window_, context_factory_));
compositor_->SetScaleAndSize(1.0f, bounds_.size());
}
@@ -83,8 +89,10 @@ void TestCompositorHostX11::Draw() {
}
// static
-TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
- return new TestCompositorHostX11(bounds);
+TestCompositorHost* TestCompositorHost::Create(
+ const gfx::Rect& bounds,
+ ui::ContextFactory* context_factory) {
+ return new TestCompositorHostX11(bounds, context_factory);
}
} // namespace ui
« no previous file with comments | « ui/compositor/test/test_compositor_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698