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()); |
181 compositor_.reset(); | 182 compositor_.reset(); |
182 } | 183 } |
183 | 184 |
184 void WindowTreeHost::DestroyDispatcher() { | 185 void WindowTreeHost::DestroyDispatcher() { |
185 delete window_; | 186 delete window_; |
186 window_ = NULL; | 187 window_ = NULL; |
187 dispatcher_.reset(); | 188 dispatcher_.reset(); |
188 | 189 |
189 // TODO(beng): this comment is no longer quite valid since this function | 190 // TODO(beng): this comment is no longer quite valid since this function |
190 // isn't called from WED, and WED isn't a subclass of Window. So it seems | 191 // 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... |
261 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 262 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
262 if (cursor_client) { | 263 if (cursor_client) { |
263 const gfx::Display& display = | 264 const gfx::Display& display = |
264 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 265 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
265 cursor_client->SetDisplay(display); | 266 cursor_client->SetDisplay(display); |
266 } | 267 } |
267 dispatcher()->OnCursorMovedToRootLocation(root_location); | 268 dispatcher()->OnCursorMovedToRootLocation(root_location); |
268 } | 269 } |
269 | 270 |
270 } // namespace aura | 271 } // namespace aura |
OLD | NEW |