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/cursor_client.h" | 8 #include "ui/aura/client/cursor_client.h" |
9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
10 #include "ui/aura/root_window_transformer.h" | 10 #include "ui/aura/root_window_transformer.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 UpdateRootWindowSize(layer_size); | 283 UpdateRootWindowSize(layer_size); |
284 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, OnHostResized(this)); | 284 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, OnHostResized(this)); |
285 delegate_->OnHostResized(layer_size); | 285 delegate_->OnHostResized(layer_size); |
286 } | 286 } |
287 | 287 |
288 void WindowTreeHost::OnHostCloseRequested() { | 288 void WindowTreeHost::OnHostCloseRequested() { |
289 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, | 289 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, |
290 OnHostCloseRequested(this)); | 290 OnHostCloseRequested(this)); |
291 } | 291 } |
292 | 292 |
293 void WindowTreeHost::OnKeyboardMappingChanged() { | |
294 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, | |
295 OnKeyboardMappingChanged(this)); | |
296 } | |
297 | |
298 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, | 293 void WindowTreeHost::MoveCursorToInternal(const gfx::Point& root_location, |
299 const gfx::Point& host_location) { | 294 const gfx::Point& host_location) { |
300 MoveCursorToNative(host_location); | 295 MoveCursorToNative(host_location); |
301 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 296 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
302 if (cursor_client) { | 297 if (cursor_client) { |
303 const gfx::Display& display = | 298 const gfx::Display& display = |
304 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 299 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
305 cursor_client->SetDisplay(display); | 300 cursor_client->SetDisplay(display); |
306 } | 301 } |
307 delegate_->OnCursorMovedToRootLocation(root_location); | 302 delegate_->OnCursorMovedToRootLocation(root_location); |
308 } | 303 } |
309 | 304 |
310 #if defined(OS_ANDROID) | 305 #if defined(OS_ANDROID) |
311 // static | 306 // static |
312 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { | 307 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { |
313 // This is only hit for tests and ash, right now these aren't an issue so | 308 // This is only hit for tests and ash, right now these aren't an issue so |
314 // adding the CHECK. | 309 // adding the CHECK. |
315 // TODO(sky): decide if we want a factory. | 310 // TODO(sky): decide if we want a factory. |
316 CHECK(false); | 311 CHECK(false); |
317 return NULL; | 312 return NULL; |
318 } | 313 } |
319 #endif | 314 #endif |
320 | 315 |
321 } // namespace aura | 316 } // namespace aura |
OLD | NEW |