| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 base::Optional<gfx::Rect> out_rect = base::nullopt; | 1676 base::Optional<gfx::Rect> out_rect = base::nullopt; |
| 1677 if (mask_rect) { | 1677 if (mask_rect) { |
| 1678 out_rect = gfx::ConvertRectToPixel(ScaleFactorForDisplay(window), | 1678 out_rect = gfx::ConvertRectToPixel(ScaleFactorForDisplay(window), |
| 1679 mask_rect.value()); | 1679 mask_rect.value()); |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 tree_->SetHitTestMask(WindowMus::Get(window_tree_host->window())->server_id(), | 1682 tree_->SetHitTestMask(WindowMus::Get(window_tree_host->window())->server_id(), |
| 1683 out_rect); | 1683 out_rect); |
| 1684 } | 1684 } |
| 1685 | 1685 |
| 1686 void WindowTreeClient::OnWindowTreeHostSetOpacity( |
| 1687 WindowTreeHostMus* window_tree_host, |
| 1688 float opacity) { |
| 1689 WindowMus* window = WindowMus::Get(window_tree_host->window()); |
| 1690 const uint32_t change_id = ScheduleInFlightChange( |
| 1691 base::MakeUnique<CrashInFlightChange>(window, ChangeType::OPACITY)); |
| 1692 tree_->SetWindowOpacity(change_id, window->server_id(), opacity); |
| 1693 } |
| 1694 |
| 1686 void WindowTreeClient::OnWindowTreeHostDeactivateWindow( | 1695 void WindowTreeClient::OnWindowTreeHostDeactivateWindow( |
| 1687 WindowTreeHostMus* window_tree_host) { | 1696 WindowTreeHostMus* window_tree_host) { |
| 1688 tree_->DeactivateWindow( | 1697 tree_->DeactivateWindow( |
| 1689 WindowMus::Get(window_tree_host->window())->server_id()); | 1698 WindowMus::Get(window_tree_host->window())->server_id()); |
| 1690 } | 1699 } |
| 1691 | 1700 |
| 1692 void WindowTreeClient::OnWindowTreeHostStackAbove( | 1701 void WindowTreeClient::OnWindowTreeHostStackAbove( |
| 1693 WindowTreeHostMus* window_tree_host, | 1702 WindowTreeHostMus* window_tree_host, |
| 1694 Window* window) { | 1703 Window* window) { |
| 1695 WindowMus* above = WindowMus::Get(window_tree_host->window()); | 1704 WindowMus* above = WindowMus::Get(window_tree_host->window()); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1845 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1837 this, capture_synchronizer_.get(), window)); | 1846 this, capture_synchronizer_.get(), window)); |
| 1838 } | 1847 } |
| 1839 | 1848 |
| 1840 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1849 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
| 1841 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1850 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
| 1842 this, focus_synchronizer_.get(), window)); | 1851 this, focus_synchronizer_.get(), window)); |
| 1843 } | 1852 } |
| 1844 | 1853 |
| 1845 } // namespace aura | 1854 } // namespace aura |
| OLD | NEW |