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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 gfx::Point root_location(host_location); | 219 gfx::Point root_location(host_location); |
220 ConvertPointFromHost(&root_location); | 220 ConvertPointFromHost(&root_location); |
221 MoveCursorToInternal(root_location, host_location); | 221 MoveCursorToInternal(root_location, host_location); |
222 } | 222 } |
223 | 223 |
224 //////////////////////////////////////////////////////////////////////////////// | 224 //////////////////////////////////////////////////////////////////////////////// |
225 // WindowTreeHost, protected: | 225 // WindowTreeHost, protected: |
226 | 226 |
227 WindowTreeHost::WindowTreeHost() | 227 WindowTreeHost::WindowTreeHost() |
228 : window_(new Window(NULL)), | 228 : window_(new Window(NULL)), |
229 last_cursor_(ui::kCursorNull) { | 229 last_cursor_(ui::kCursorNull), |
| 230 display_ids_(std::make_pair(gfx::Display::kInvalidDisplayID, |
| 231 gfx::Display::kInvalidDisplayID)) { |
230 } | 232 } |
231 | 233 |
232 void WindowTreeHost::DestroyCompositor() { | 234 void WindowTreeHost::DestroyCompositor() { |
233 DCHECK(GetAcceleratedWidget()); | 235 DCHECK(GetAcceleratedWidget()); |
234 compositor_.reset(); | 236 compositor_.reset(); |
235 } | 237 } |
236 | 238 |
237 void WindowTreeHost::DestroyDispatcher() { | 239 void WindowTreeHost::DestroyDispatcher() { |
238 delete window_; | 240 delete window_; |
239 window_ = NULL; | 241 window_ = NULL; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 316 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
315 if (cursor_client) { | 317 if (cursor_client) { |
316 const gfx::Display& display = | 318 const gfx::Display& display = |
317 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 319 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
318 cursor_client->SetDisplay(display); | 320 cursor_client->SetDisplay(display); |
319 } | 321 } |
320 dispatcher()->OnCursorMovedToRootLocation(root_location); | 322 dispatcher()->OnCursorMovedToRootLocation(root_location); |
321 } | 323 } |
322 | 324 |
323 } // namespace aura | 325 } // namespace aura |
OLD | NEW |