Chromium Code Reviews| 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 "mash/wm/bridge/wm_window_mus.h" | 5 #include "mash/wm/bridge/wm_window_mus.h" |
| 6 | 6 |
| 7 #include "ash/wm/common/container_finder.h" | 7 #include "ash/wm/common/container_finder.h" |
| 8 #include "ash/wm/common/window_state.h" | 8 #include "ash/wm/common/window_state.h" |
| 9 #include "ash/wm/common/wm_layout_manager.h" | 9 #include "ash/wm/common/wm_layout_manager.h" |
| 10 #include "ash/wm/common/wm_window_observer.h" | 10 #include "ash/wm/common/wm_window_observer.h" |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 OnWindowStackingChanged(this)); | 580 OnWindowStackingChanged(this)); |
| 581 } | 581 } |
| 582 | 582 |
| 583 void WmWindowMus::OnWindowSharedPropertyChanged( | 583 void WmWindowMus::OnWindowSharedPropertyChanged( |
| 584 mus::Window* window, | 584 mus::Window* window, |
| 585 const std::string& name, | 585 const std::string& name, |
| 586 const std::vector<uint8_t>* old_data, | 586 const std::vector<uint8_t>* old_data, |
| 587 const std::vector<uint8_t>* new_data) { | 587 const std::vector<uint8_t>* new_data) { |
| 588 if (name == mus::mojom::WindowManager::kShowState_Property) { | 588 if (name == mus::mojom::WindowManager::kShowState_Property) { |
| 589 GetWindowState()->OnWindowShowStateChanged(); | 589 GetWindowState()->OnWindowShowStateChanged(); |
| 590 return; | |
|
sky
2016/05/19 23:00:11
I accidentally removed this when addressing feedba
| |
| 590 } | 591 } |
| 591 if (name == mus::mojom::WindowManager::kAlwaysOnTop_Property) { | 592 if (name == mus::mojom::WindowManager::kAlwaysOnTop_Property) { |
| 592 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, | 593 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, |
| 593 OnWindowPropertyChanged( | 594 OnWindowPropertyChanged( |
| 594 this, ash::wm::WmWindowProperty::ALWAYS_ON_TOP, 0u)); | 595 this, ash::wm::WmWindowProperty::ALWAYS_ON_TOP)); |
| 595 return; | 596 return; |
| 596 } | 597 } |
| 597 | 598 |
| 598 // Deal with snap to pixel. | 599 // Deal with snap to pixel. |
| 599 NOTIMPLEMENTED(); | 600 NOTIMPLEMENTED(); |
| 600 } | 601 } |
| 601 | 602 |
| 602 void WmWindowMus::OnWindowBoundsChanged(mus::Window* window, | 603 void WmWindowMus::OnWindowBoundsChanged(mus::Window* window, |
| 603 const gfx::Rect& old_bounds, | 604 const gfx::Rect& old_bounds, |
| 604 const gfx::Rect& new_bounds) { | 605 const gfx::Rect& new_bounds) { |
| 605 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, | 606 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, |
| 606 OnWindowBoundsChanged(this, old_bounds, new_bounds)); | 607 OnWindowBoundsChanged(this, old_bounds, new_bounds)); |
| 607 } | 608 } |
| 608 | 609 |
| 609 void WmWindowMus::OnWindowDestroying(mus::Window* window) { | 610 void WmWindowMus::OnWindowDestroying(mus::Window* window) { |
| 610 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, | 611 FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_, |
| 611 OnWindowDestroying(this)); | 612 OnWindowDestroying(this)); |
| 612 } | 613 } |
| 613 | 614 |
| 614 } // namespace wm | 615 } // namespace wm |
| 615 } // namespace mash | 616 } // namespace mash |
| OLD | NEW |