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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1749323002: Update WindowTree::OnWindowInputEventAck to include handled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 return; 813 return;
814 814
815 WindowPrivate(window).LocalSetSharedProperty(name, std::move(new_data)); 815 WindowPrivate(window).LocalSetSharedProperty(name, std::move(new_data));
816 } 816 }
817 817
818 void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id, 818 void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id,
819 Id window_id, 819 Id window_id,
820 mojom::EventPtr event) { 820 mojom::EventPtr event) {
821 Window* window = GetWindowById(window_id); 821 Window* window = GetWindowById(window_id);
822 if (!window || !window->input_event_handler_) { 822 if (!window || !window->input_event_handler_) {
823 tree_->OnWindowInputEventAck(event_id); 823 tree_->OnWindowInputEventAck(event_id, false);
824 return; 824 return;
825 } 825 }
826 826
827 scoped_ptr<base::Closure> ack_callback( 827 scoped_ptr<base::Callback<void(bool)>> ack_callback(
828 new base::Closure(base::Bind(&mojom::WindowTree::OnWindowInputEventAck, 828 new base::Callback<void(bool)>(
829 base::Unretained(tree_), event_id))); 829 base::Bind(&mojom::WindowTree::OnWindowInputEventAck,
830 base::Unretained(tree_), event_id)));
830 window->input_event_handler_->OnWindowInputEvent(window, std::move(event), 831 window->input_event_handler_->OnWindowInputEvent(window, std::move(event),
831 &ack_callback); 832 &ack_callback);
832 if (ack_callback) 833 if (ack_callback)
833 ack_callback->Run(); 834 ack_callback->Run(false);
sky 2016/03/01 23:08:17 Why does this supply false?
jonross 2016/03/01 23:26:16 There is an undocumented expectation on: window-
834 } 835 }
835 836
836 void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) { 837 void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) {
837 Window* focused_window = GetWindowById(focused_window_id); 838 Window* focused_window = GetWindowById(focused_window_id);
838 InFlightFocusChange new_change(this, focused_window); 839 InFlightFocusChange new_change(this, focused_window);
839 if (ApplyServerChangeToExistingInFlightChange(new_change)) 840 if (ApplyServerChangeToExistingInFlightChange(new_change))
840 return; 841 return;
841 842
842 LocalSetFocus(focused_window); 843 LocalSetFocus(focused_window);
843 } 844 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 980
980 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( 981 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
981 Window* window, 982 Window* window,
982 const gfx::Vector2d& offset, 983 const gfx::Vector2d& offset,
983 const gfx::Insets& hit_area) { 984 const gfx::Insets& hit_area) {
984 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 985 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
985 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); 986 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area));
986 } 987 }
987 988
988 } // namespace mus 989 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698