| 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 } | 1543 } |
| 1544 // The change originated from client code and needs to be sent to the server. | 1544 // The change originated from client code and needs to be sent to the server. |
| 1545 DCHECK(tree_); | 1545 DCHECK(tree_); |
| 1546 WindowMus* child_mus = WindowMus::Get(transient_child); | 1546 WindowMus* child_mus = WindowMus::Get(transient_child); |
| 1547 const uint32_t change_id = | 1547 const uint32_t change_id = |
| 1548 ScheduleInFlightChange(base::MakeUnique<CrashInFlightChange>( | 1548 ScheduleInFlightChange(base::MakeUnique<CrashInFlightChange>( |
| 1549 child_mus, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT)); | 1549 child_mus, ChangeType::REMOVE_TRANSIENT_WINDOW_FROM_PARENT)); |
| 1550 tree_->RemoveTransientWindowFromParent(change_id, child_mus->server_id()); | 1550 tree_->RemoveTransientWindowFromParent(change_id, child_mus->server_id()); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 void WindowTreeClient::OnWillRestackTransientChildAbove(Window* source, |
| 1554 Window* window) { |
| 1555 DCHECK(source->parent()); |
| 1556 DCHECK_EQ(source->parent(), window->parent()); |
| 1557 WindowMus::Get(source->parent()) |
| 1558 ->PrepareForTransientRestack(WindowMus::Get(window)); |
| 1559 } |
| 1560 |
| 1561 void WindowTreeClient::OnDidRestackTransientChildAbove(Window* source, |
| 1562 Window* window) { |
| 1563 DCHECK(source->parent()); |
| 1564 DCHECK_EQ(source->parent(), window->parent()); |
| 1565 WindowMus::Get(source->parent()) |
| 1566 ->OnTransientRestackDone(WindowMus::Get(window)); |
| 1567 } |
| 1568 |
| 1553 uint32_t WindowTreeClient::CreateChangeIdForDrag(WindowMus* window) { | 1569 uint32_t WindowTreeClient::CreateChangeIdForDrag(WindowMus* window) { |
| 1554 return ScheduleInFlightChange( | 1570 return ScheduleInFlightChange( |
| 1555 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); | 1571 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); |
| 1556 } | 1572 } |
| 1557 | 1573 |
| 1558 uint32_t WindowTreeClient::CreateChangeIdForCapture(WindowMus* window) { | 1574 uint32_t WindowTreeClient::CreateChangeIdForCapture(WindowMus* window) { |
| 1559 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1575 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
| 1560 this, capture_synchronizer_.get(), window)); | 1576 this, capture_synchronizer_.get(), window)); |
| 1561 } | 1577 } |
| 1562 | 1578 |
| 1563 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1579 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
| 1564 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1580 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
| 1565 this, focus_synchronizer_.get(), window)); | 1581 this, focus_synchronizer_.get(), window)); |
| 1566 } | 1582 } |
| 1567 | 1583 |
| 1568 } // namespace aura | 1584 } // namespace aura |
| OLD | NEW |