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

Unified Diff: ui/aura/desktop.cc

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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
Index: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index 7824c128539dbbab4027ff30a7fec828f72ed9ba..69acf9e25568089f60a61c4cfc7f216a8945453b 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -44,9 +44,6 @@ static const int kDefaultHostWindowHeight = 1024;
// static
Desktop* Desktop::instance_ = NULL;
-// static
-ui::Compositor*(*Desktop::compositor_factory_)() = NULL;
-
Desktop::Desktop()
: Window(NULL),
host_(aura::DesktopHost::Create(GetInitialHostWindowBounds())),
@@ -64,8 +61,8 @@ Desktop::Desktop()
host_->SetDesktop(this);
last_mouse_location_ = host_->QueryMouseLocation();
- if (compositor_factory_) {
- compositor_ = (*Desktop::compositor_factory())();
+ if (ui::Compositor::compositor_factory()) {
+ compositor_ = (*ui::Compositor::compositor_factory())(this);
} else {
compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
host_->GetSize());

Powered by Google App Engine
This is Rietveld 408576698