| Index: ui/aura/window_tree_host.cc
|
| diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
|
| index 5fdadb9ebbb210ea2c3fdf3d5d2d45fc020f4f02..f8fff7c54fbc4cc5f763b970ab9d0ccf0ccf4fbf 100644
|
| --- a/ui/aura/window_tree_host.cc
|
| +++ b/ui/aura/window_tree_host.cc
|
| @@ -49,17 +49,6 @@ WindowTreeHost::~WindowTreeHost() {
|
| }
|
| }
|
|
|
| -#if defined(OS_ANDROID)
|
| -// static
|
| -WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
|
| - // This is only hit for tests and ash, right now these aren't an issue so
|
| - // adding the CHECK.
|
| - // TODO(sky): decide if we want a factory.
|
| - CHECK(false);
|
| - return nullptr;
|
| -}
|
| -#endif
|
| -
|
| // static
|
| WindowTreeHost* WindowTreeHost::GetForAcceleratedWidget(
|
| gfx::AcceleratedWidget widget) {
|
| @@ -239,30 +228,29 @@ void WindowTreeHost::DestroyDispatcher() {
|
| //window()->RemoveOrDestroyChildren();
|
| }
|
|
|
| -void WindowTreeHost::CreateCompositor(
|
| - gfx::AcceleratedWidget accelerated_widget) {
|
| +void WindowTreeHost::CreateCompositor() {
|
| DCHECK(Env::GetInstance());
|
| ui::ContextFactory* context_factory = Env::GetInstance()->context_factory();
|
| DCHECK(context_factory);
|
| compositor_.reset(
|
| - new ui::Compositor(GetAcceleratedWidget(),
|
| - context_factory,
|
| - base::ThreadTaskRunnerHandle::Get()));
|
| - // TODO(beng): I think this setup should probably all move to a "accelerated
|
| - // widget available" function.
|
| + new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get()));
|
| if (!dispatcher()) {
|
| window()->Init(ui::LAYER_NOT_DRAWN);
|
| window()->set_host(this);
|
| window()->SetName("RootWindow");
|
| window()->SetEventTargeter(
|
| scoped_ptr<ui::EventTargeter>(new WindowTargeter()));
|
| - prop_.reset(new ui::ViewProp(GetAcceleratedWidget(),
|
| - kWindowTreeHostForAcceleratedWidget,
|
| - this));
|
| dispatcher_.reset(new WindowEventDispatcher(this));
|
| }
|
| }
|
|
|
| +void WindowTreeHost::OnAcceleratedWidgetAvailable() {
|
| + compositor_->OnAcceleratedWidgetAvailable(GetAcceleratedWidget());
|
| + prop_.reset(new ui::ViewProp(GetAcceleratedWidget(),
|
| + kWindowTreeHostForAcceleratedWidget,
|
| + this));
|
| +}
|
| +
|
| void WindowTreeHost::OnHostMoved(const gfx::Point& new_location) {
|
| TRACE_EVENT1("ui", "WindowTreeHost::OnHostMoved",
|
| "origin", new_location.ToString());
|
|
|