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

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

Issue 267293004: Wires up view manager to an actual display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/shell/view_manager_loader.cc ('k') | no next file » | 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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "ui/aura/client/capture_client.h" 8 #include "ui/aura/client/capture_client.h"
9 #include "ui/aura/client/cursor_client.h" 9 #include "ui/aura/client/cursor_client.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 //////////////////////////////////////////////////////////////////////////////// 172 ////////////////////////////////////////////////////////////////////////////////
173 // WindowTreeHost, protected: 173 // WindowTreeHost, protected:
174 174
175 WindowTreeHost::WindowTreeHost() 175 WindowTreeHost::WindowTreeHost()
176 : window_(new Window(NULL)), 176 : window_(new Window(NULL)),
177 last_cursor_(ui::kCursorNull) { 177 last_cursor_(ui::kCursorNull) {
178 } 178 }
179 179
180 void WindowTreeHost::DestroyCompositor() { 180 void WindowTreeHost::DestroyCompositor() {
181 DCHECK(GetAcceleratedWidget());
182 compositor_.reset(); 181 compositor_.reset();
183 } 182 }
184 183
185 void WindowTreeHost::DestroyDispatcher() { 184 void WindowTreeHost::DestroyDispatcher() {
186 delete window_; 185 delete window_;
187 window_ = NULL; 186 window_ = NULL;
188 dispatcher_.reset(); 187 dispatcher_.reset();
189 188
190 // TODO(beng): this comment is no longer quite valid since this function 189 // TODO(beng): this comment is no longer quite valid since this function
191 // isn't called from WED, and WED isn't a subclass of Window. So it seems 190 // isn't called from WED, and WED isn't a subclass of Window. So it seems
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 client::CursorClient* cursor_client = client::GetCursorClient(window()); 261 client::CursorClient* cursor_client = client::GetCursorClient(window());
263 if (cursor_client) { 262 if (cursor_client) {
264 const gfx::Display& display = 263 const gfx::Display& display =
265 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); 264 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window());
266 cursor_client->SetDisplay(display); 265 cursor_client->SetDisplay(display);
267 } 266 }
268 dispatcher()->OnCursorMovedToRootLocation(root_location); 267 dispatcher()->OnCursorMovedToRootLocation(root_location);
269 } 268 }
270 269
271 } // namespace aura 270 } // namespace aura
OLDNEW
« no previous file with comments | « mojo/shell/view_manager_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698