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

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

Issue 2736943003: Start to decouple display::Display from ws::PlatformDisplay. (Closed)
Patch Set: Fix comments. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void WindowTree::AddRootForWindowManager(const ServerWindow* root) { 192 void WindowTree::AddRootForWindowManager(const ServerWindow* root) {
193 DCHECK(window_manager_internal_); 193 DCHECK(window_manager_internal_);
194 const ClientWindowId client_window_id(WindowIdToTransportId(root->id())); 194 const ClientWindowId client_window_id(WindowIdToTransportId(root->id()));
195 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id)); 195 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id));
196 client_id_to_window_id_map_[client_window_id] = root->id(); 196 client_id_to_window_id_map_[client_window_id] = root->id();
197 window_id_to_client_id_map_[root->id()] = client_window_id; 197 window_id_to_client_id_map_[root->id()] = client_window_id;
198 roots_.insert(root); 198 roots_.insert(root);
199 199
200 Display* display = GetDisplay(root); 200 Display* ws_display = GetDisplay(root);
201 DCHECK(display); 201 DCHECK(ws_display);
202 202
203 window_manager_internal_->WmNewDisplayAdded(display->ToDisplay(), 203 window_manager_internal_->WmNewDisplayAdded(ws_display->GetDisplay(),
204 WindowToWindowData(root), 204 WindowToWindowData(root),
205 root->parent()->IsDrawn()); 205 root->parent()->IsDrawn());
206 } 206 }
207 207
208 void WindowTree::OnWindowDestroyingTreeImpl(WindowTree* tree) { 208 void WindowTree::OnWindowDestroyingTreeImpl(WindowTree* tree) {
209 if (event_source_wms_ && event_source_wms_->window_tree() == tree) 209 if (event_source_wms_ && event_source_wms_->window_tree() == tree)
210 event_source_wms_ = nullptr; 210 event_source_wms_ = nullptr;
211 211
212 // Notify our client if |tree| was embedded in any of our windows. 212 // Notify our client if |tree| was embedded in any of our windows.
213 for (const auto* tree_root : tree->roots_) { 213 for (const auto* tree_root : tree->roots_) {
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 2179 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
2180 effect_bitmask, callback); 2180 effect_bitmask, callback);
2181 } 2181 }
2182 2182
2183 void WindowTree::PerformOnDragDropDone() { 2183 void WindowTree::PerformOnDragDropDone() {
2184 client()->OnDragDropDone(); 2184 client()->OnDragDropDone();
2185 } 2185 }
2186 2186
2187 } // namespace ws 2187 } // namespace ws
2188 } // namespace ui 2188 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_state_unittest.cc ('k') | services/ui/ws/window_tree_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698