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

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

Issue 2189893004: Unify display ids between Display and PlatformDisplay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to pure virtual. Created 4 years, 4 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 | « services/ui/ws/user_display_manager.cc ('k') | 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (roots_.empty()) 93 if (roots_.empty())
94 return; 94 return;
95 95
96 std::vector<const ServerWindow*> to_send; 96 std::vector<const ServerWindow*> to_send;
97 CHECK_EQ(1u, roots_.size()); 97 CHECK_EQ(1u, roots_.size());
98 const ServerWindow* root = *roots_.begin(); 98 const ServerWindow* root = *roots_.begin();
99 GetUnknownWindowsFrom(root, &to_send); 99 GetUnknownWindowsFrom(root, &to_send);
100 100
101 Display* display = GetDisplay(root); 101 Display* display = GetDisplay(root);
102 int64_t display_id = 102 int64_t display_id =
103 display ? display->id() : display::Display::kInvalidDisplayID; 103 display ? display->GetId() : display::Display::kInvalidDisplayID;
104 const ServerWindow* focused_window = 104 const ServerWindow* focused_window =
105 display ? display->GetFocusedWindow() : nullptr; 105 display ? display->GetFocusedWindow() : nullptr;
106 if (focused_window) 106 if (focused_window)
107 focused_window = access_policy_->GetWindowForFocusChange(focused_window); 107 focused_window = access_policy_->GetWindowForFocusChange(focused_window);
108 ClientWindowId focused_window_id; 108 ClientWindowId focused_window_id;
109 if (focused_window) 109 if (focused_window)
110 IsWindowKnown(focused_window, &focused_window_id); 110 IsWindowKnown(focused_window, &focused_window_id);
111 111
112 const bool drawn = root->parent() && root->parent()->IsDrawn(); 112 const bool drawn = root->parent() && root->parent()->IsDrawn();
113 client()->OnEmbed(id_, WindowToWindowData(to_send.front()), std::move(tree), 113 client()->OnEmbed(id_, WindowToWindowData(to_send.front()), std::move(tree),
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // We were paused, so the id should still be valid. 406 // We were paused, so the id should still be valid.
407 DCHECK(IsValidIdForNewWindow( 407 DCHECK(IsValidIdForNewWindow(
408 waiting_for_top_level_window_info->client_window_id)); 408 waiting_for_top_level_window_info->client_window_id));
409 client_id_to_window_id_map_[waiting_for_top_level_window_info 409 client_id_to_window_id_map_[waiting_for_top_level_window_info
410 ->client_window_id] = window->id(); 410 ->client_window_id] = window->id();
411 window_id_to_client_id_map_[window->id()] = 411 window_id_to_client_id_map_[window->id()] =
412 waiting_for_top_level_window_info->client_window_id; 412 waiting_for_top_level_window_info->client_window_id;
413 roots_.insert(window); 413 roots_.insert(window);
414 Display* display = GetDisplay(window); 414 Display* display = GetDisplay(window);
415 int64_t display_id = 415 int64_t display_id =
416 display ? display->id() : display::Display::kInvalidDisplayID; 416 display ? display->GetId() : display::Display::kInvalidDisplayID;
417 const bool drawn = window->parent() && window->parent()->IsDrawn(); 417 const bool drawn = window->parent() && window->parent()->IsDrawn();
418 client()->OnTopLevelCreated(client_change_id, WindowToWindowData(window), 418 client()->OnTopLevelCreated(client_change_id, WindowToWindowData(window),
419 display_id, drawn); 419 display_id, drawn);
420 } 420 }
421 421
422 void WindowTree::AddActivationParent(const ClientWindowId& window_id) { 422 void WindowTree::AddActivationParent(const ClientWindowId& window_id) {
423 ServerWindow* window = GetWindowByClientId(window_id); 423 ServerWindow* window = GetWindowByClientId(window_id);
424 if (window) { 424 if (window) {
425 Display* display = GetDisplay(window); 425 Display* display = GetDisplay(window);
426 if (display) 426 if (display)
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 } 1670 }
1671 1671
1672 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1672 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1673 const ServerWindow* window) const { 1673 const ServerWindow* window) const {
1674 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1674 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1675 return tree && tree != this; 1675 return tree && tree != this;
1676 } 1676 }
1677 1677
1678 } // namespace ws 1678 } // namespace ws
1679 } // namespace ui 1679 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698