| 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/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), | 278 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), |
| 279 adjusted_size); | 279 adjusted_size); |
| 280 | 280 |
| 281 gfx::Size layer_size = GetBounds().size(); | 281 gfx::Size layer_size = GetBounds().size(); |
| 282 // The layer, and the observers should be notified of the | 282 // The layer, and the observers should be notified of the |
| 283 // transformed size of the root window. | 283 // transformed size of the root window. |
| 284 UpdateRootWindowSize(layer_size); | 284 UpdateRootWindowSize(layer_size); |
| 285 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, OnHostResized(this)); | 285 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, OnHostResized(this)); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void WindowTreeHost::OnHostWorkspaceChanged() { |
| 289 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, |
| 290 OnHostWorkspaceChanged(this)); |
| 291 } |
| 292 |
| 288 void WindowTreeHost::OnHostCloseRequested() { | 293 void WindowTreeHost::OnHostCloseRequested() { |
| 289 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, | 294 FOR_EACH_OBSERVER(WindowTreeHostObserver, observers_, |
| 290 OnHostCloseRequested(this)); | 295 OnHostCloseRequested(this)); |
| 291 } | 296 } |
| 292 | 297 |
| 293 void WindowTreeHost::OnHostActivated() { | 298 void WindowTreeHost::OnHostActivated() { |
| 294 Env::GetInstance()->NotifyHostActivated(this); | 299 Env::GetInstance()->NotifyHostActivated(this); |
| 295 } | 300 } |
| 296 | 301 |
| 297 void WindowTreeHost::OnHostLostWindowCapture() { | 302 void WindowTreeHost::OnHostLostWindowCapture() { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 314 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 319 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 315 if (cursor_client) { | 320 if (cursor_client) { |
| 316 const gfx::Display& display = | 321 const gfx::Display& display = |
| 317 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window()); | 322 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window()); |
| 318 cursor_client->SetDisplay(display); | 323 cursor_client->SetDisplay(display); |
| 319 } | 324 } |
| 320 dispatcher()->OnCursorMovedToRootLocation(root_location); | 325 dispatcher()->OnCursorMovedToRootLocation(root_location); |
| 321 } | 326 } |
| 322 | 327 |
| 323 } // namespace aura | 328 } // namespace aura |
| OLD | NEW |