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

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

Issue 2667073002: mash: changes can_accept_events to an enum (Closed)
Patch Set: merge Created 3 years, 10 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/window_manager_access_policy.cc ('k') | services/ui/ws/window_tree.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_display_root.h" 5 #include "services/ui/ws/window_manager_display_root.h"
6 6
7 #include "services/ui/ws/display_manager.h" 7 #include "services/ui/ws/display_manager.h"
8 #include "services/ui/ws/server_window.h" 8 #include "services/ui/ws/server_window.h"
9 #include "services/ui/ws/window_server.h" 9 #include "services/ui/ws/window_server.h"
10 10
11 namespace ui { 11 namespace ui {
12 namespace ws { 12 namespace ws {
13 13
14 WindowManagerDisplayRoot::WindowManagerDisplayRoot(Display* display) 14 WindowManagerDisplayRoot::WindowManagerDisplayRoot(Display* display)
15 : display_(display) { 15 : display_(display) {
16 root_.reset(window_server()->CreateServerWindow( 16 root_.reset(window_server()->CreateServerWindow(
17 window_server()->display_manager()->GetAndAdvanceNextRootId(), 17 window_server()->display_manager()->GetAndAdvanceNextRootId(),
18 ServerWindow::Properties())); 18 ServerWindow::Properties()));
19 root_->set_event_targeting_policy(
20 mojom::EventTargetingPolicy::DESCENDANTS_ONLY);
19 // Our root is always a child of the Display's root. Do this 21 // Our root is always a child of the Display's root. Do this
20 // before the WindowTree has been created so that the client doesn't get 22 // before the WindowTree has been created so that the client doesn't get
21 // notified of the add, bounds change and visibility change. 23 // notified of the add, bounds change and visibility change.
22 root_->SetBounds(gfx::Rect(display->root_window()->bounds().size())); 24 root_->SetBounds(gfx::Rect(display->root_window()->bounds().size()));
23 root_->SetVisible(true); 25 root_->SetVisible(true);
24 display->root_window()->Add(root_.get()); 26 display->root_window()->Add(root_.get());
25 } 27 }
26 28
27 WindowManagerDisplayRoot::~WindowManagerDisplayRoot() {} 29 WindowManagerDisplayRoot::~WindowManagerDisplayRoot() {}
28 30
29 WindowServer* WindowManagerDisplayRoot::window_server() { 31 WindowServer* WindowManagerDisplayRoot::window_server() {
30 return display_->window_server(); 32 return display_->window_server();
31 } 33 }
32 34
33 } // namespace ws 35 } // namespace ws
34 } // namespace ui 36 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_manager_access_policy.cc ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698