OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mus/window_manager.h" | 5 #include "ash/mus/window_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 wm_state_(base::MakeUnique<::wm::WMState>()), | 83 wm_state_(base::MakeUnique<::wm::WMState>()), |
84 property_converter_(base::MakeUnique<aura::PropertyConverter>()) { | 84 property_converter_(base::MakeUnique<aura::PropertyConverter>()) { |
85 property_converter_->RegisterProperty( | 85 property_converter_->RegisterProperty( |
86 kPanelAttachedKey, ui::mojom::WindowManager::kPanelAttached_Property, | 86 kPanelAttachedKey, ui::mojom::WindowManager::kPanelAttached_Property, |
87 aura::PropertyConverter::CreateAcceptAnyValueCallback()); | 87 aura::PropertyConverter::CreateAcceptAnyValueCallback()); |
88 property_converter_->RegisterProperty( | 88 property_converter_->RegisterProperty( |
89 kRenderTitleAreaProperty, | 89 kRenderTitleAreaProperty, |
90 ui::mojom::WindowManager::kRenderParentTitleArea_Property, | 90 ui::mojom::WindowManager::kRenderParentTitleArea_Property, |
91 aura::PropertyConverter::CreateAcceptAnyValueCallback()); | 91 aura::PropertyConverter::CreateAcceptAnyValueCallback()); |
92 property_converter_->RegisterProperty( | 92 property_converter_->RegisterProperty( |
| 93 kShelfIDKey, ui::mojom::WindowManager::kShelfID_Property, |
| 94 aura::PropertyConverter::CreateAcceptAnyValueCallback()); |
| 95 property_converter_->RegisterProperty( |
93 kShelfItemTypeKey, ui::mojom::WindowManager::kShelfItemType_Property, | 96 kShelfItemTypeKey, ui::mojom::WindowManager::kShelfItemType_Property, |
94 base::Bind(&IsValidShelfItemType)); | 97 base::Bind(&IsValidShelfItemType)); |
95 property_converter_->RegisterProperty( | 98 property_converter_->RegisterProperty( |
96 ::wm::kShadowElevationKey, | 99 ::wm::kShadowElevationKey, |
97 ui::mojom::WindowManager::kShadowElevation_Property, | 100 ui::mojom::WindowManager::kShadowElevation_Property, |
98 base::Bind(&::wm::IsValidShadowElevation)); | 101 base::Bind(&::wm::IsValidShadowElevation)); |
99 property_converter_->RegisterProperty(kWindowPinTypeKey, | 102 property_converter_->RegisterProperty(kWindowPinTypeKey, |
100 ash::mojom::kWindowPinType_Property, | 103 ash::mojom::kWindowPinType_Property, |
101 base::Bind(&ash::IsValidWindowPinType)); | 104 base::Bind(&ash::IsValidWindowPinType)); |
102 } | 105 } |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 bool WindowManager::IsWindowActive(aura::Window* window) { | 582 bool WindowManager::IsWindowActive(aura::Window* window) { |
580 return Shell::Get()->activation_client()->GetActiveWindow() == window; | 583 return Shell::Get()->activation_client()->GetActiveWindow() == window; |
581 } | 584 } |
582 | 585 |
583 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { | 586 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { |
584 Shell::Get()->activation_client()->DeactivateWindow(window); | 587 Shell::Get()->activation_client()->DeactivateWindow(window); |
585 } | 588 } |
586 | 589 |
587 } // namespace mus | 590 } // namespace mus |
588 } // namespace ash | 591 } // namespace ash |
OLD | NEW |