Chromium Code Reviews| 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 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 void WindowTreeClient::OnWindowTreeHostStackAtTop( | 1705 void WindowTreeClient::OnWindowTreeHostStackAtTop( |
| 1706 WindowTreeHostMus* window_tree_host) { | 1706 WindowTreeHostMus* window_tree_host) { |
| 1707 WindowMus* window = WindowMus::Get(window_tree_host->window()); | 1707 WindowMus* window = WindowMus::Get(window_tree_host->window()); |
| 1708 const uint32_t change_id = ScheduleInFlightChange( | 1708 const uint32_t change_id = ScheduleInFlightChange( |
| 1709 base::MakeUnique<CrashInFlightChange>(window, ChangeType::REORDER)); | 1709 base::MakeUnique<CrashInFlightChange>(window, ChangeType::REORDER)); |
| 1710 tree_->StackAtTop(change_id, window->server_id()); | 1710 tree_->StackAtTop(change_id, window->server_id()); |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 void WindowTreeClient::OnWindowTreeHostPerformWindowMove( | |
| 1714 WindowTreeHostMus* window_tree_host, | |
| 1715 ui::mojom::MoveLoopSource source, | |
| 1716 const gfx::Point& cursor_location, | |
| 1717 const base::Callback<void(bool)>& callback) { | |
| 1718 PerformWindowMove(window_tree_host->window(), | |
|
sky
2017/01/27 19:00:31
Is there any reason to keep the PerformWindowMove/
Elliot Glaysher
2017/01/27 20:22:16
There are not. Moved implementations.
| |
| 1719 source, | |
| 1720 cursor_location, | |
| 1721 callback); | |
| 1722 } | |
| 1723 | |
| 1724 void WindowTreeClient::OnWindowTreeHostCancelWindowMove( | |
| 1725 WindowTreeHostMus* window_tree_host) { | |
| 1726 CancelWindowMove(window_tree_host->window()); | |
| 1727 } | |
| 1728 | |
| 1713 std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel( | 1729 std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel( |
| 1714 const std::map<std::string, std::vector<uint8_t>>* properties) { | 1730 const std::map<std::string, std::vector<uint8_t>>* properties) { |
| 1715 std::unique_ptr<WindowPortMus> window_port = | 1731 std::unique_ptr<WindowPortMus> window_port = |
| 1716 base::MakeUnique<WindowPortMus>(this, WindowMusType::TOP_LEVEL); | 1732 base::MakeUnique<WindowPortMus>(this, WindowMusType::TOP_LEVEL); |
| 1717 roots_.insert(window_port.get()); | 1733 roots_.insert(window_port.get()); |
| 1718 | 1734 |
| 1719 window_port->set_server_id(MakeTransportId(client_id_, next_window_id_++)); | 1735 window_port->set_server_id(MakeTransportId(client_id_, next_window_id_++)); |
| 1720 RegisterWindowMus(window_port.get()); | 1736 RegisterWindowMus(window_port.get()); |
| 1721 | 1737 |
| 1722 std::unordered_map<std::string, std::vector<uint8_t>> transport_properties; | 1738 std::unordered_map<std::string, std::vector<uint8_t>> transport_properties; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1817 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1833 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1818 this, capture_synchronizer_.get(), window)); | 1834 this, capture_synchronizer_.get(), window)); |
| 1819 } | 1835 } |
| 1820 | 1836 |
| 1821 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1837 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
| 1822 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1838 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
| 1823 this, focus_synchronizer_.get(), window)); | 1839 this, focus_synchronizer_.get(), window)); |
| 1824 } | 1840 } |
| 1825 | 1841 |
| 1826 } // namespace aura | 1842 } // namespace aura |
| OLD | NEW |