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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/aura/window_layer_type.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 DCHECK(Env::GetInstance()); 204 DCHECK(Env::GetInstance());
205 ui::ContextFactory* context_factory = Env::GetInstance()->context_factory(); 205 ui::ContextFactory* context_factory = Env::GetInstance()->context_factory();
206 DCHECK(context_factory); 206 DCHECK(context_factory);
207 compositor_.reset( 207 compositor_.reset(
208 new ui::Compositor(GetAcceleratedWidget(), 208 new ui::Compositor(GetAcceleratedWidget(),
209 context_factory, 209 context_factory,
210 base::ThreadTaskRunnerHandle::Get())); 210 base::ThreadTaskRunnerHandle::Get()));
211 // TODO(beng): I think this setup should probably all move to a "accelerated 211 // TODO(beng): I think this setup should probably all move to a "accelerated
212 // widget available" function. 212 // widget available" function.
213 if (!dispatcher()) { 213 if (!dispatcher()) {
214 window()->Init(WINDOW_LAYER_NOT_DRAWN); 214 window()->Init(ui::LAYER_NOT_DRAWN);
215 window()->set_host(this); 215 window()->set_host(this);
216 window()->SetName("RootWindow"); 216 window()->SetName("RootWindow");
217 window()->SetEventTargeter( 217 window()->SetEventTargeter(
218 scoped_ptr<ui::EventTargeter>(new WindowTargeter())); 218 scoped_ptr<ui::EventTargeter>(new WindowTargeter()));
219 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(), 219 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(),
220 kWindowTreeHostForAcceleratedWidget, 220 kWindowTreeHostForAcceleratedWidget,
221 this)); 221 this));
222 dispatcher_.reset(new WindowEventDispatcher(this)); 222 dispatcher_.reset(new WindowEventDispatcher(this));
223 } 223 }
224 } 224 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 client::CursorClient* cursor_client = client::GetCursorClient(window()); 269 client::CursorClient* cursor_client = client::GetCursorClient(window());
270 if (cursor_client) { 270 if (cursor_client) {
271 const gfx::Display& display = 271 const gfx::Display& display =
272 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 272 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window());
273 cursor_client->SetDisplay(display); 273 cursor_client->SetDisplay(display);
274 } 274 }
275 dispatcher()->OnCursorMovedToRootLocation(root_location); 275 dispatcher()->OnCursorMovedToRootLocation(root_location);
276 } 276 }
277 277
278 } // namespace aura 278 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_layer_type.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698