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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 gfx::Point root_location(host_location); | 167 gfx::Point root_location(host_location); |
168 ConvertPointFromHost(&root_location); | 168 ConvertPointFromHost(&root_location); |
169 MoveCursorToInternal(root_location, host_location); | 169 MoveCursorToInternal(root_location, host_location); |
170 } | 170 } |
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 display_ids_(std::make_pair(gfx::Display::kInvalidDisplayID, |
| 179 gfx::Display::kInvalidDisplayID)) { |
178 } | 180 } |
179 | 181 |
180 void WindowTreeHost::DestroyCompositor() { | 182 void WindowTreeHost::DestroyCompositor() { |
181 DCHECK(GetAcceleratedWidget()); | 183 DCHECK(GetAcceleratedWidget()); |
182 compositor_.reset(); | 184 compositor_.reset(); |
183 } | 185 } |
184 | 186 |
185 void WindowTreeHost::DestroyDispatcher() { | 187 void WindowTreeHost::DestroyDispatcher() { |
186 delete window_; | 188 delete window_; |
187 window_ = NULL; | 189 window_ = NULL; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 264 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
263 if (cursor_client) { | 265 if (cursor_client) { |
264 const gfx::Display& display = | 266 const gfx::Display& display = |
265 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 267 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
266 cursor_client->SetDisplay(display); | 268 cursor_client->SetDisplay(display); |
267 } | 269 } |
268 dispatcher()->OnCursorMovedToRootLocation(root_location); | 270 dispatcher()->OnCursorMovedToRootLocation(root_location); |
269 } | 271 } |
270 | 272 |
271 } // namespace aura | 273 } // namespace aura |
OLD | NEW |