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

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

Issue 2164133002: Moves DCHECK so that it might actually hit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); 1009 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>();
1010 } 1010 }
1011 client()->OnChangeCompleted( 1011 client()->OnChangeCompleted(
1012 change_id, NewWindow(ClientWindowId(transport_window_id), properties)); 1012 change_id, NewWindow(ClientWindowId(transport_window_id), properties));
1013 } 1013 }
1014 1014
1015 void WindowTree::NewTopLevelWindow( 1015 void WindowTree::NewTopLevelWindow(
1016 uint32_t change_id, 1016 uint32_t change_id,
1017 Id transport_window_id, 1017 Id transport_window_id,
1018 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { 1018 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) {
1019 DCHECK(!waiting_for_top_level_window_info_);
1020 // TODO(sky): rather than DCHECK, have this kill connection. 1019 // TODO(sky): rather than DCHECK, have this kill connection.
1021 DCHECK(!window_manager_internal_); // Not valid for the windowmanager. 1020 DCHECK(!window_manager_internal_); // Not valid for the windowmanager.
1021 DCHECK(!waiting_for_top_level_window_info_);
1022 const ClientWindowId client_window_id(transport_window_id); 1022 const ClientWindowId client_window_id(transport_window_id);
1023 // TODO(sky): need a way for client to provide context to figure out display. 1023 // TODO(sky): need a way for client to provide context to figure out display.
1024 Display* display = display_manager()->displays().empty() 1024 Display* display = display_manager()->displays().empty()
1025 ? nullptr 1025 ? nullptr
1026 : *(display_manager()->displays().begin()); 1026 : *(display_manager()->displays().begin());
1027 // TODO(sky): move checks to accesspolicy. 1027 // TODO(sky): move checks to accesspolicy.
1028 WindowManagerDisplayRoot* display_root = 1028 WindowManagerDisplayRoot* display_root =
1029 display && user_id_ != InvalidUserId() 1029 display && user_id_ != InvalidUserId()
1030 ? display->GetWindowManagerDisplayRootForUser(user_id_) 1030 ? display->GetWindowManagerDisplayRootForUser(user_id_)
1031 : nullptr; 1031 : nullptr;
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 } 1669 }
1670 1670
1671 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1671 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1672 const ServerWindow* window) const { 1672 const ServerWindow* window) const {
1673 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1673 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1674 return tree && tree != this; 1674 return tree && tree != this;
1675 } 1675 }
1676 1676
1677 } // namespace ws 1677 } // namespace ws
1678 } // namespace ui 1678 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698