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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 2 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/display.h ('k') | services/ui/ws/display_manager.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/display.h" 5 #include "services/ui/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 display_root->window_manager_state_ = window_manager_state; 278 display_root->window_manager_state_ = window_manager_state;
279 const bool is_active = 279 const bool is_active =
280 factory->user_id() == window_server_->user_id_tracker()->active_id(); 280 factory->user_id() == window_server_->user_id_tracker()->active_id();
281 display_root->root()->SetVisible(is_active); 281 display_root->root()->SetVisible(is_active);
282 window_manager_state->window_tree()->AddRootForWindowManager( 282 window_manager_state->window_tree()->AddRootForWindowManager(
283 display_root->root()); 283 display_root->root());
284 window_manager_state->AddWindowManagerDisplayRoot( 284 window_manager_state->AddWindowManagerDisplayRoot(
285 std::move(display_root_ptr)); 285 std::move(display_root_ptr));
286 } 286 }
287 287
288 ServerWindow* Display::GetActiveRootWindow() {
289 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
290 if (display_root)
291 return display_root->root();
292 return nullptr;
293 }
294
288 ServerWindow* Display::GetRootWindow() { 295 ServerWindow* Display::GetRootWindow() {
289 return root_.get(); 296 return root_.get();
290 } 297 }
291 298
292 bool Display::IsInHighContrastMode() { 299 bool Display::IsInHighContrastMode() {
293 return window_server_->IsActiveUserInHighContrastMode(); 300 return window_server_->IsActiveUserInHighContrastMode();
294 } 301 }
295 302
296 void Display::OnEvent(const ui::Event& event) { 303 void Display::OnEvent(const ui::Event& event) {
297 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot(); 304 WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 432 }
426 433
427 void Display::OnWindowManagerWindowTreeFactoryReady( 434 void Display::OnWindowManagerWindowTreeFactoryReady(
428 WindowManagerWindowTreeFactory* factory) { 435 WindowManagerWindowTreeFactory* factory) {
429 if (!binding_) 436 if (!binding_)
430 CreateWindowManagerDisplayRootFromFactory(factory); 437 CreateWindowManagerDisplayRootFromFactory(factory);
431 } 438 }
432 439
433 } // namespace ws 440 } // namespace ws
434 } // namespace ui 441 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698