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 "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 | 174 |
175 //////////////////////////////////////////////////////////////////////////////// | 175 //////////////////////////////////////////////////////////////////////////////// |
176 // WindowTreeHost, protected: | 176 // WindowTreeHost, protected: |
177 | 177 |
178 WindowTreeHost::WindowTreeHost() | 178 WindowTreeHost::WindowTreeHost() |
179 : window_(new Window(NULL)), | 179 : window_(new Window(NULL)), |
180 last_cursor_(ui::kCursorNull) { | 180 last_cursor_(ui::kCursorNull) { |
181 } | 181 } |
182 | 182 |
183 void WindowTreeHost::DestroyCompositor() { | 183 void WindowTreeHost::DestroyCompositor() { |
184 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, | |
sky
2015/01/23 17:32:18
Can whoever cares about this notification listen d
ccameron
2015/01/23 18:52:27
Sure (just checked that observers can be removed w
| |
185 OnHostCompositorWillBeDestroyed(this)); | |
184 compositor_.reset(); | 186 compositor_.reset(); |
185 } | 187 } |
186 | 188 |
187 void WindowTreeHost::DestroyDispatcher() { | 189 void WindowTreeHost::DestroyDispatcher() { |
188 delete window_; | 190 delete window_; |
189 window_ = NULL; | 191 window_ = NULL; |
190 dispatcher_.reset(); | 192 dispatcher_.reset(); |
191 | 193 |
192 // TODO(beng): this comment is no longer quite valid since this function | 194 // TODO(beng): this comment is no longer quite valid since this function |
193 // isn't called from WED, and WED isn't a subclass of Window. So it seems | 195 // isn't called from WED, and WED isn't a subclass of Window. So it seems |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 271 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
270 if (cursor_client) { | 272 if (cursor_client) { |
271 const gfx::Display& display = | 273 const gfx::Display& display = |
272 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 274 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
273 cursor_client->SetDisplay(display); | 275 cursor_client->SetDisplay(display); |
274 } | 276 } |
275 dispatcher()->OnCursorMovedToRootLocation(root_location); | 277 dispatcher()->OnCursorMovedToRootLocation(root_location); |
276 } | 278 } |
277 | 279 |
278 } // namespace aura | 280 } // namespace aura |
OLD | NEW |