Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Unified Diff: services/ui/ws/server_window.cc

Issue 2711913006: Move FrameSink hierarchy registration to DisplayCompositor interface (Closed)
Patch Set: Fix mojom Formatting Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/server_window.cc
diff --git a/services/ui/ws/server_window.cc b/services/ui/ws/server_window.cc
index b1e6573366f11ca5cf780464a4cf7069c63d7613..9c5bce01942d101a8c69460a44de9624c25a48cc 100644
--- a/services/ui/ws/server_window.cc
+++ b/services/ui/ws/server_window.cc
@@ -26,6 +26,7 @@ ServerWindow::ServerWindow(ServerWindowDelegate* delegate,
const Properties& properties)
: delegate_(delegate),
id_(id),
+ frame_sink_id_(WindowIdToTransportId(id), 0),
parent_(nullptr),
stacking_target_(nullptr),
transient_parent_(nullptr),
@@ -117,18 +118,12 @@ void ServerWindow::Add(ServerWindow* child) {
for (auto& observer : child->observers_)
observer.OnWillChangeWindowHierarchy(child, this, old_parent);
- ServerWindow* old_root = child->GetRoot();
- ServerWindow* new_root = GetRoot();
-
if (child->parent())
child->parent()->RemoveImpl(child);
child->parent_ = this;
children_.push_back(child);
- if (old_root != new_root)
- child->ProcessRootChanged(old_root, new_root);
-
// Stack the child properly if it is a transient child of a sibling.
if (child->transient_parent_ && child->transient_parent_->parent() == this)
RestackTransientDescendants(child->transient_parent_, &GetStackingTarget,
@@ -149,9 +144,6 @@ void ServerWindow::Remove(ServerWindow* child) {
RemoveImpl(child);
- if (GetRoot() != nullptr)
- child->ProcessRootChanged(GetRoot(), nullptr);
-
// Stack the child properly if it is a transient child of a sibling.
if (child->transient_parent_ && child->transient_parent_->parent() == this)
RestackTransientDescendants(child->transient_parent_, &GetStackingTarget,
@@ -431,14 +423,6 @@ void ServerWindow::RemoveImpl(ServerWindow* window) {
children_.erase(std::find(children_.begin(), children_.end(), window));
}
-void ServerWindow::ProcessRootChanged(ServerWindow* old_root,
- ServerWindow* new_root) {
- if (compositor_frame_sink_manager_)
- compositor_frame_sink_manager_->OnRootChanged(old_root, new_root);
- for (ServerWindow* child : children_)
- child->ProcessRootChanged(old_root, new_root);
-}
-
void ServerWindow::OnStackingChanged() {
if (stacking_target_) {
Windows::const_iterator window_i = std::find(
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698