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

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: 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 | « ui/aura/test/mus/test_window_tree.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 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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 InitHost(); 288 InitHost();
289 289
290 // Transient parents are connected using the Window created by WindowTreeHost, 290 // Transient parents are connected using the Window created by WindowTreeHost,
291 // which is owned by the window manager. This way the window manager can 291 // which is owned by the window manager. This way the window manager can
292 // properly identify and honor transients. 292 // properly identify and honor transients.
293 if (params.parent && params.parent->GetHost()) { 293 if (params.parent && params.parent->GetHost()) {
294 aura::client::GetTransientWindowClient()->AddTransientChild( 294 aura::client::GetTransientWindowClient()->AddTransientChild(
295 params.parent->GetHost()->window(), window()); 295 params.parent->GetHost()->window(), window());
296 } 296 }
297 297
298 if (!params.accept_events) 298 if (!params.accept_events) {
299 aura::WindowPortMus::Get(window())->SetCanAcceptEvents(false); 299 aura::WindowPortMus::Get(window())->SetEventTargetingPolicy(
300 ui::mojom::EventTargetingPolicy::NONE);
301 }
300 } 302 }
301 303
302 void DesktopWindowTreeHostMus::OnNativeWidgetCreated( 304 void DesktopWindowTreeHostMus::OnNativeWidgetCreated(
303 const Widget::InitParams& params) { 305 const Widget::InitParams& params) {
304 if (params.parent && params.parent->GetHost()) { 306 if (params.parent && params.parent->GetHost()) {
305 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost()); 307 parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost());
306 parent_->children_.insert(this); 308 parent_->children_.insert(this);
307 } 309 }
308 native_widget_delegate_->OnNativeWidgetCreated(true); 310 native_widget_delegate_->OnNativeWidgetCreated(true);
309 } 311 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 aura::client::FocusClient* focus_client, 795 aura::client::FocusClient* focus_client,
794 aura::Window* window) { 796 aura::Window* window) {
795 if (window == this->window()) { 797 if (window == this->window()) {
796 desktop_native_widget_aura_->HandleActivationChanged(true); 798 desktop_native_widget_aura_->HandleActivationChanged(true);
797 } else if (is_active_) { 799 } else if (is_active_) {
798 desktop_native_widget_aura_->HandleActivationChanged(false); 800 desktop_native_widget_aura_->HandleActivationChanged(false);
799 } 801 }
800 } 802 }
801 803
802 } // namespace views 804 } // namespace views
OLDNEW
« no previous file with comments | « 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