| 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 "components/mus/public/cpp/window.h" | 5 #include "components/mus/public/cpp/window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 void Window::LocalDestroy() { | 601 void Window::LocalDestroy() { |
| 602 delete this; | 602 delete this; |
| 603 } | 603 } |
| 604 | 604 |
| 605 void Window::LocalAddChild(Window* child) { | 605 void Window::LocalAddChild(Window* child) { |
| 606 ScopedTreeNotifier notifier(child, child->parent(), this); | 606 ScopedTreeNotifier notifier(child, child->parent(), this); |
| 607 if (child->parent()) | 607 if (child->parent()) |
| 608 RemoveChildImpl(child, &child->parent_->children_); | 608 RemoveChildImpl(child, &child->parent_->children_); |
| 609 children_.push_back(child); | 609 children_.push_back(child); |
| 610 child->parent_ = this; | 610 child->parent_ = this; |
| 611 child->display_id_ = display_id_; |
| 611 } | 612 } |
| 612 | 613 |
| 613 void Window::LocalRemoveChild(Window* child) { | 614 void Window::LocalRemoveChild(Window* child) { |
| 614 DCHECK_EQ(this, child->parent()); | 615 DCHECK_EQ(this, child->parent()); |
| 615 ScopedTreeNotifier notifier(child, this, nullptr); | 616 ScopedTreeNotifier notifier(child, this, nullptr); |
| 616 RemoveChildImpl(child, &children_); | 617 RemoveChildImpl(child, &children_); |
| 617 } | 618 } |
| 618 | 619 |
| 619 void Window::LocalAddTransientWindow(Window* transient_window) { | 620 void Window::LocalAddTransientWindow(Window* transient_window) { |
| 620 if (transient_window->transient_parent()) | 621 if (transient_window->transient_parent()) |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 notifier->NotifyWindowReordered(); | 886 notifier->NotifyWindowReordered(); |
| 886 | 887 |
| 887 return true; | 888 return true; |
| 888 } | 889 } |
| 889 | 890 |
| 890 // static | 891 // static |
| 891 Window** Window::GetStackingTarget(Window* window) { | 892 Window** Window::GetStackingTarget(Window* window) { |
| 892 return &window->stacking_target_; | 893 return &window->stacking_target_; |
| 893 } | 894 } |
| 894 } // namespace mus | 895 } // namespace mus |
| OLD | NEW |