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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Forget to add these files to previous patch. Created 4 years, 1 month 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/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 if (!display_root) { 1668 if (!display_root) {
1669 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)"; 1669 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)";
1670 return; 1670 return;
1671 } 1671 }
1672 1672
1673 WindowManagerState* wms = display_root->window_manager_state(); 1673 WindowManagerState* wms = display_root->window_manager_state();
1674 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop( 1674 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop(
1675 window_server_->GetCurrentMoveLoopChangeId()); 1675 window_server_->GetCurrentMoveLoopChangeId());
1676 } 1676 }
1677 1677
1678 void WindowTree::AddAccelerator(uint32_t id, 1678 void WindowTree::AddAccelerator(
1679 mojom::EventMatcherPtr event_matcher, 1679 mojo::Array<mojom::AcceleratorEventPtr> multi_accelerators,
1680 const AddAcceleratorCallback& callback) { 1680 const AddAcceleratorCallback& callback) {
1681 DCHECK(window_manager_state_); 1681 DCHECK(window_manager_state_);
1682
1682 const bool success = 1683 const bool success =
1683 window_manager_state_->event_dispatcher()->AddAccelerator( 1684 window_manager_state_->event_dispatcher()->AddAccelerator(
1684 id, std::move(event_matcher)); 1685 std::move(multi_accelerators));
1685 callback.Run(success); 1686 callback.Run(success);
1686 } 1687 }
1687 1688
1688 void WindowTree::RemoveAccelerator(uint32_t id) { 1689 void WindowTree::RemoveAccelerator(uint32_t id) {
1689 window_manager_state_->event_dispatcher()->RemoveAccelerator(id); 1690 window_manager_state_->event_dispatcher()->RemoveAccelerator(id);
1690 } 1691 }
1691 1692
1692 void WindowTree::AddActivationParent(Id transport_window_id) { 1693 void WindowTree::AddActivationParent(Id transport_window_id) {
1693 AddActivationParent(ClientWindowId(transport_window_id)); 1694 AddActivationParent(ClientWindowId(transport_window_id));
1694 } 1695 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 1935 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
1935 effect_bitmask, callback); 1936 effect_bitmask, callback);
1936 } 1937 }
1937 1938
1938 void WindowTree::PerformOnDragDropDone() { 1939 void WindowTree::PerformOnDragDropDone() {
1939 client()->OnDragDropDone(); 1940 client()->OnDragDropDone();
1940 } 1941 }
1941 1942
1942 } // namespace ws 1943 } // namespace ws
1943 } // namespace ui 1944 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698