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

Side by Side Diff: services/ui/ws/window_manager_window_tree_factory_set.cc

Issue 2484223006: Remove CreateDefaultDisplay(). (Closed)
Patch Set: Remove debug LOG. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_manager_window_tree_factory_set.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/window_manager_window_tree_factory_set.h" 5 #include "services/ui/ws/window_manager_window_tree_factory_set.h"
6 6
7 #include "services/ui/ws/user_id_tracker_observer.h" 7 #include "services/ui/ws/user_id_tracker_observer.h"
8 #include "services/ui/ws/window_manager_window_tree_factory.h" 8 #include "services/ui/ws/window_manager_window_tree_factory.h"
9 #include "services/ui/ws/window_manager_window_tree_factory_set_observer.h" 9 #include "services/ui/ws/window_manager_window_tree_factory_set_observer.h"
10 #include "services/ui/ws/window_server.h" 10 #include "services/ui/ws/window_server.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 observers_.AddObserver(observer); 73 observers_.AddObserver(observer);
74 } 74 }
75 75
76 void WindowManagerWindowTreeFactorySet::RemoveObserver( 76 void WindowManagerWindowTreeFactorySet::RemoveObserver(
77 WindowManagerWindowTreeFactorySetObserver* observer) { 77 WindowManagerWindowTreeFactorySetObserver* observer) {
78 observers_.RemoveObserver(observer); 78 observers_.RemoveObserver(observer);
79 } 79 }
80 80
81 void WindowManagerWindowTreeFactorySet::OnWindowManagerWindowTreeFactoryReady( 81 void WindowManagerWindowTreeFactorySet::OnWindowManagerWindowTreeFactoryReady(
82 WindowManagerWindowTreeFactory* factory) { 82 WindowManagerWindowTreeFactory* factory) {
83 const bool is_first_valid_factory = !got_valid_factory_;
84 got_valid_factory_ = true;
85 for (auto& observer : observers_) 83 for (auto& observer : observers_)
86 observer.OnWindowManagerWindowTreeFactoryReady(factory); 84 observer.OnWindowManagerWindowTreeFactoryReady(factory);
87
88 // Notify after other observers as WindowServer triggers other
89 // observers being added, which will have already processed the add.
90 if (is_first_valid_factory)
91 window_server_->OnFirstWindowManagerWindowTreeFactoryReady();
92 } 85 }
93 86
94 void WindowManagerWindowTreeFactorySet::OnUserIdRemoved(const UserId& id) { 87 void WindowManagerWindowTreeFactorySet::OnUserIdRemoved(const UserId& id) {
95 factories_.erase(id); 88 factories_.erase(id);
96 } 89 }
97 90
98 } // namespace ws 91 } // namespace ws
99 } // namespace ui 92 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_window_tree_factory_set.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698