| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/views/mus/desktop_window_tree_host_mus.h" | 5 #include "ui/views/mus/desktop_window_tree_host_mus.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 screen_bounds.set_size(size); | 397 screen_bounds.set_size(size); |
| 398 SetBoundsInDIP(screen_bounds); | 398 SetBoundsInDIP(screen_bounds); |
| 399 } | 399 } |
| 400 | 400 |
| 401 void DesktopWindowTreeHostMus::StackAbove(aura::Window* window) { | 401 void DesktopWindowTreeHostMus::StackAbove(aura::Window* window) { |
| 402 // TODO: implement window stacking, http://crbug.com/663617. | 402 // TODO: implement window stacking, http://crbug.com/663617. |
| 403 NOTIMPLEMENTED(); | 403 NOTIMPLEMENTED(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void DesktopWindowTreeHostMus::StackAtTop() { | 406 void DesktopWindowTreeHostMus::StackAtTop() { |
| 407 // TODO: implement window stacking, http://crbug.com/663617. | 407 // Request to the server to stack our current mus window at the top. Our |
| 408 NOTIMPLEMENTED(); | 408 // window() is a root, and we can't reach up past it so we can't just request |
| 409 // a Reorder(), which is what we'd do to reorder our own subwindows. |
| 410 WindowTreeHostMus::StackAtTop(); |
| 409 } | 411 } |
| 410 | 412 |
| 411 void DesktopWindowTreeHostMus::CenterWindow(const gfx::Size& size) { | 413 void DesktopWindowTreeHostMus::CenterWindow(const gfx::Size& size) { |
| 412 gfx::Rect bounds_to_center_in = GetWorkAreaBoundsInScreen(); | 414 gfx::Rect bounds_to_center_in = GetWorkAreaBoundsInScreen(); |
| 413 | 415 |
| 414 // If there is a transient parent and it fits |size|, then center over it. | 416 // If there is a transient parent and it fits |size|, then center over it. |
| 415 aura::Window* content_window = desktop_native_widget_aura_->content_window(); | 417 aura::Window* content_window = desktop_native_widget_aura_->content_window(); |
| 416 if (wm::GetTransientParent(content_window)) { | 418 if (wm::GetTransientParent(content_window)) { |
| 417 gfx::Rect transient_parent_bounds = | 419 gfx::Rect transient_parent_bounds = |
| 418 wm::GetTransientParent(content_window)->GetBoundsInScreen(); | 420 wm::GetTransientParent(content_window)->GetBoundsInScreen(); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 aura::client::FocusClient* focus_client, | 730 aura::client::FocusClient* focus_client, |
| 729 aura::Window* window) { | 731 aura::Window* window) { |
| 730 if (window == this->window()) { | 732 if (window == this->window()) { |
| 731 desktop_native_widget_aura_->HandleActivationChanged(true); | 733 desktop_native_widget_aura_->HandleActivationChanged(true); |
| 732 } else if (is_active_) { | 734 } else if (is_active_) { |
| 733 desktop_native_widget_aura_->HandleActivationChanged(false); | 735 desktop_native_widget_aura_->HandleActivationChanged(false); |
| 734 } | 736 } |
| 735 } | 737 } |
| 736 | 738 |
| 737 } // namespace views | 739 } // namespace views |
| OLD | NEW |