| 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 "services/ui/ws/server_window.h" | 5 #include "services/ui/ws/server_window.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ServerWindow::~ServerWindow() { | 48 ServerWindow::~ServerWindow() { |
| 49 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, OnWindowDestroying(this)); | 49 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, OnWindowDestroying(this)); |
| 50 | 50 |
| 51 if (transient_parent_) | 51 if (transient_parent_) |
| 52 transient_parent_->RemoveTransientWindow(this); | 52 transient_parent_->RemoveTransientWindow(this); |
| 53 | 53 |
| 54 // Destroy transient children, only after we've removed ourselves from our | 54 // Destroy transient children, only after we've removed ourselves from our |
| 55 // parent, as destroying an active transient child may otherwise attempt to | 55 // parent, as destroying an active transient child may otherwise attempt to |
| 56 // refocus us. | 56 // refocus us. |
| 57 Windows transient_children(transient_children_); | 57 Windows transient_children(transient_children_); |
| 58 STLDeleteElements(&transient_children); | 58 base::STLDeleteElements(&transient_children); |
| 59 DCHECK(transient_children_.empty()); | 59 DCHECK(transient_children_.empty()); |
| 60 | 60 |
| 61 while (!children_.empty()) | 61 while (!children_.empty()) |
| 62 children_.front()->parent()->Remove(children_.front()); | 62 children_.front()->parent()->Remove(children_.front()); |
| 63 | 63 |
| 64 if (parent_) | 64 if (parent_) |
| 65 parent_->Remove(this); | 65 parent_->Remove(this); |
| 66 | 66 |
| 67 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, OnWindowDestroyed(this)); | 67 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, OnWindowDestroyed(this)); |
| 68 } | 68 } |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 449 } |
| 450 | 450 |
| 451 // static | 451 // static |
| 452 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 452 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
| 453 return &window->stacking_target_; | 453 return &window->stacking_target_; |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace ws | 456 } // namespace ws |
| 457 | 457 |
| 458 } // namespace ui | 458 } // namespace ui |
| OLD | NEW |