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

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2667073002: mash: changes can_accept_events to an enum (Closed)
Patch Set: 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
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 "ui/views/mus/desktop_window_tree_host_mus.h" 5 #include "ui/views/mus/desktop_window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 InitHost(); 273 InitHost();
274 274
275 // Transient parents are connected using the Window created by WindowTreeHost, 275 // Transient parents are connected using the Window created by WindowTreeHost,
276 // which is owned by the window manager. This way the window manager can 276 // which is owned by the window manager. This way the window manager can
277 // properly identify and honor transients. 277 // properly identify and honor transients.
278 if (params.parent && params.parent->GetHost()) { 278 if (params.parent && params.parent->GetHost()) {
279 aura::client::GetTransientWindowClient()->AddTransientChild( 279 aura::client::GetTransientWindowClient()->AddTransientChild(
280 params.parent->GetHost()->window(), window()); 280 params.parent->GetHost()->window(), window());
281 } 281 }
282 282
283 if (!params.accept_events) 283 if (!params.accept_events) {
284 aura::WindowPortMus::Get(window())->SetCanAcceptEvents(false); 284 aura::WindowPortMus::Get(window())->SetEventTargetingPolicy(
285 ui::mojom::EventTargetingPolicy::NONE);
286 }
285 } 287 }
286 288
287 void DesktopWindowTreeHostMus::OnNativeWidgetCreated( 289 void DesktopWindowTreeHostMus::OnNativeWidgetCreated(
288 const Widget::InitParams& params) { 290 const Widget::InitParams& params) {
289 if (params.parent && params.parent->GetHost()) { 291 if (params.parent && params.parent->GetHost()) {
290 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost()); 292 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost());
291 parent_->children_.insert(this); 293 parent_->children_.insert(this);
292 } 294 }
293 native_widget_delegate_->OnNativeWidgetCreated(true); 295 native_widget_delegate_->OnNativeWidgetCreated(true);
294 } 296 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 aura::client::FocusClient* focus_client, 737 aura::client::FocusClient* focus_client,
736 aura::Window* window) { 738 aura::Window* window) {
737 if (window == this->window()) { 739 if (window == this->window()) {
738 desktop_native_widget_aura_->HandleActivationChanged(true); 740 desktop_native_widget_aura_->HandleActivationChanged(true);
739 } else if (is_active_) { 741 } else if (is_active_) {
740 desktop_native_widget_aura_->HandleActivationChanged(false); 742 desktop_native_widget_aura_->HandleActivationChanged(false);
741 } 743 }
742 } 744 }
743 745
744 } // namespace views 746 } // namespace views
OLDNEW
« services/ui/ws/window_finder.cc ('K') | « ui/aura/test/mus/test_window_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698