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

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

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 4 years, 5 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_tree_unittest.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 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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 return new ClientSideNonClientFrameView(GetWidget()); 686 return new ClientSideNonClientFrameView(GetWidget());
687 } 687 }
688 688
689 void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) { 689 void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) {
690 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_); 690 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_);
691 aura::Window* hosted_window = window_tree_host_->window(); 691 aura::Window* hosted_window = window_tree_host_->window();
692 692
693 ownership_ = params.ownership; 693 ownership_ = params.ownership;
694 window_->SetCanFocus(params.activatable == 694 window_->SetCanFocus(params.activatable ==
695 Widget::InitParams::ACTIVATABLE_YES); 695 Widget::InitParams::ACTIVATABLE_YES);
696 window_->SetCanAcceptEvents(params.accept_events);
696 697
697 window_tree_host_->AddObserver(this); 698 window_tree_host_->AddObserver(this);
698 window_tree_host_->InitHost(); 699 window_tree_host_->InitHost();
699 hosted_window->SetProperty(kMusWindow, window_); 700 hosted_window->SetProperty(kMusWindow, window_);
700 701
701 focus_client_.reset( 702 focus_client_.reset(
702 new FocusControllerMus(new FocusRulesImpl(hosted_window))); 703 new FocusControllerMus(new FocusRulesImpl(hosted_window)));
703 704
704 aura::client::SetFocusClient(hosted_window, focus_client_.get()); 705 aura::client::SetFocusClient(hosted_window, focus_client_.get());
705 aura::client::SetActivationClient(hosted_window, focus_client_.get()); 706 aura::client::SetActivationClient(hosted_window, focus_client_.get());
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 1434
1434 gfx::Path mask_path; 1435 gfx::Path mask_path;
1435 native_widget_delegate_->GetHitTestMask(&mask_path); 1436 native_widget_delegate_->GetHitTestMask(&mask_path);
1436 // TODO(jamescook): Use the full path for the mask. 1437 // TODO(jamescook): Use the full path for the mask.
1437 gfx::Rect mask_rect = 1438 gfx::Rect mask_rect =
1438 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1439 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1439 window_->SetHitTestMask(mask_rect); 1440 window_->SetHitTestMask(mask_rect);
1440 } 1441 }
1441 1442
1442 } // namespace views 1443 } // namespace views
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698