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 "ash/wm_window.h" | 5 #include "ash/wm_window.h" |
6 | 6 |
7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/aura/aura_layout_manager_adapter.h" | 8 #include "ash/aura/aura_layout_manager_adapter.h" |
9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
10 #include "ash/public/cpp/window_properties.h" | 10 #include "ash/public/cpp/window_properties.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "ui/base/class_property.h" | 37 #include "ui/base/class_property.h" |
38 #include "ui/base/hit_test.h" | 38 #include "ui/base/hit_test.h" |
39 #include "ui/compositor/layer_tree_owner.h" | 39 #include "ui/compositor/layer_tree_owner.h" |
40 #include "ui/compositor/scoped_layer_animation_settings.h" | 40 #include "ui/compositor/scoped_layer_animation_settings.h" |
41 #include "ui/display/screen.h" | 41 #include "ui/display/screen.h" |
42 #include "ui/gfx/geometry/insets.h" | 42 #include "ui/gfx/geometry/insets.h" |
43 #include "ui/views/widget/widget.h" | 43 #include "ui/views/widget/widget.h" |
44 #include "ui/views/widget/widget_delegate.h" | 44 #include "ui/views/widget/widget_delegate.h" |
45 #include "ui/wm/core/coordinate_conversion.h" | 45 #include "ui/wm/core/coordinate_conversion.h" |
46 #include "ui/wm/core/easy_resize_window_targeter.h" | 46 #include "ui/wm/core/easy_resize_window_targeter.h" |
| 47 #include "ui/wm/core/ime_util.h" |
47 #include "ui/wm/core/transient_window_manager.h" | 48 #include "ui/wm/core/transient_window_manager.h" |
48 #include "ui/wm/core/visibility_controller.h" | 49 #include "ui/wm/core/visibility_controller.h" |
49 #include "ui/wm/core/window_util.h" | 50 #include "ui/wm/core/window_util.h" |
50 | 51 |
51 DECLARE_UI_CLASS_PROPERTY_TYPE(ash::WmWindow*); | 52 DECLARE_UI_CLASS_PROPERTY_TYPE(ash::WmWindow*); |
52 | 53 |
53 namespace ash { | 54 namespace ash { |
54 | 55 |
55 DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(WmWindow, kWmWindowKey, nullptr); | 56 DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(WmWindow, kWmWindowKey, nullptr); |
56 | 57 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 const gfx::Rect& WmWindow::GetBounds() const { | 441 const gfx::Rect& WmWindow::GetBounds() const { |
441 return window_->bounds(); | 442 return window_->bounds(); |
442 } | 443 } |
443 | 444 |
444 gfx::Rect WmWindow::GetTargetBounds() { | 445 gfx::Rect WmWindow::GetTargetBounds() { |
445 return window_->GetTargetBounds(); | 446 return window_->GetTargetBounds(); |
446 } | 447 } |
447 | 448 |
448 void WmWindow::ClearRestoreBounds() { | 449 void WmWindow::ClearRestoreBounds() { |
449 window_->ClearProperty(aura::client::kRestoreBoundsKey); | 450 window_->ClearProperty(aura::client::kRestoreBoundsKey); |
| 451 window_->ClearProperty(::wm::kVirtualKeyboardRestoreBoundsKey); |
450 } | 452 } |
451 | 453 |
452 void WmWindow::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { | 454 void WmWindow::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { |
453 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); | 455 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); |
454 } | 456 } |
455 | 457 |
456 gfx::Rect WmWindow::GetRestoreBoundsInScreen() const { | 458 gfx::Rect WmWindow::GetRestoreBoundsInScreen() const { |
457 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey); | 459 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey); |
458 return bounds ? *bounds : gfx::Rect(); | 460 return bounds ? *bounds : gfx::Rect(); |
459 } | 461 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 observer.OnTransientChildAdded(this, Get(transient)); | 765 observer.OnTransientChildAdded(this, Get(transient)); |
764 } | 766 } |
765 | 767 |
766 void WmWindow::OnTransientChildRemoved(aura::Window* window, | 768 void WmWindow::OnTransientChildRemoved(aura::Window* window, |
767 aura::Window* transient) { | 769 aura::Window* transient) { |
768 for (auto& observer : transient_observers_) | 770 for (auto& observer : transient_observers_) |
769 observer.OnTransientChildRemoved(this, Get(transient)); | 771 observer.OnTransientChildRemoved(this, Get(transient)); |
770 } | 772 } |
771 | 773 |
772 } // namespace ash | 774 } // namespace ash |
OLD | NEW |