OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |