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

Side by Side Diff: services/ui/public/cpp/lib/window_tree_client.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: Check if can_accept_events setting has changed; change names 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/cpp/window_tree_client.h" 5 #include "services/ui/public/cpp/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // WindowTreeClient, WindowTreeClient implementation: 698 // WindowTreeClient, WindowTreeClient implementation:
699 699
700 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) { 700 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) {
701 observers_.AddObserver(observer); 701 observers_.AddObserver(observer);
702 } 702 }
703 703
704 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) { 704 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) {
705 observers_.RemoveObserver(observer); 705 observers_.RemoveObserver(observer);
706 } 706 }
707 707
708 void WindowTreeClient::SetCanAcceptEvents(Id window_id,
709 bool can_accept_events) {
710 DCHECK(tree_);
711 if (can_accept_events_ != can_accept_events) {
712 tree_->SetCanAcceptEvents(window_id, can_accept_events);
713 can_accept_events_ = can_accept_events;
sadrul 2016/07/12 17:32:33 This is wrong. Some window in a WindowTreeClient m
riajiang 2016/07/12 18:46:40 Done. Moved to ui::Window.
714 }
715 }
716
708 void WindowTreeClient::OnEmbed(ClientSpecificId client_id, 717 void WindowTreeClient::OnEmbed(ClientSpecificId client_id,
709 mojom::WindowDataPtr root_data, 718 mojom::WindowDataPtr root_data,
710 mojom::WindowTreePtr tree, 719 mojom::WindowTreePtr tree,
711 int64_t display_id, 720 int64_t display_id,
712 Id focused_window_id, 721 Id focused_window_id,
713 bool drawn) { 722 bool drawn) {
714 DCHECK(!tree_ptr_); 723 DCHECK(!tree_ptr_);
715 tree_ptr_ = std::move(tree); 724 tree_ptr_ = std::move(tree);
716 tree_ptr_.set_connection_error_handler( 725 tree_ptr_.set_connection_error_handler(
717 base::Bind(&DeleteWindowTreeClient, this)); 726 base::Bind(&DeleteWindowTreeClient, this));
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 Window* window, 1251 Window* window,
1243 const gfx::Vector2d& offset, 1252 const gfx::Vector2d& offset,
1244 const gfx::Insets& hit_area) { 1253 const gfx::Insets& hit_area) {
1245 if (window_manager_internal_client_) { 1254 if (window_manager_internal_client_) {
1246 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1255 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1247 server_id(window), offset.x(), offset.y(), hit_area); 1256 server_id(window), offset.x(), offset.y(), hit_area);
1248 } 1257 }
1249 } 1258 }
1250 1259
1251 } // namespace ui 1260 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698