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

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Create anonymous namespace helper for AcceleratorTransport mojom struct. Cleanup/format codes. Created 4 years 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 "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 ui::mojom::Cursor cursor_id) { 1424 ui::mojom::Cursor cursor_id) {
1425 window_manager_internal_client_->WmSetNonClientCursor( 1425 window_manager_internal_client_->WmSetNonClientCursor(
1426 WindowMus::Get(window)->server_id(), cursor_id); 1426 WindowMus::Get(window)->server_id(), cursor_id);
1427 } 1427 }
1428 1428
1429 void WindowTreeClient::AddAccelerator( 1429 void WindowTreeClient::AddAccelerator(
1430 uint32_t id, 1430 uint32_t id,
1431 ui::mojom::EventMatcherPtr event_matcher, 1431 ui::mojom::EventMatcherPtr event_matcher,
1432 const base::Callback<void(bool)>& callback) { 1432 const base::Callback<void(bool)>& callback) {
1433 if (window_manager_internal_client_) { 1433 if (window_manager_internal_client_) {
1434 window_manager_internal_client_->AddAccelerator( 1434 std::vector<ui::mojom::AcceleratorTransportPtr> multi_accelerators;
1435 id, std::move(event_matcher), callback); 1435 ui::mojom::AcceleratorTransportPtr accelerator_transport(
1436 ui::mojom::AcceleratorTransport::New());
1437 accelerator_transport->id = id;
1438 accelerator_transport->event_matcher = std::move(event_matcher);
1439 multi_accelerators.push_back(std::move(accelerator_transport));
1440 window_manager_internal_client_->AddAccelerators(
1441 std::move(multi_accelerators), callback);
1442 ;
1436 } 1443 }
1437 } 1444 }
1438 1445
1439 void WindowTreeClient::RemoveAccelerator(uint32_t id) { 1446 void WindowTreeClient::RemoveAccelerator(uint32_t id) {
1440 if (window_manager_internal_client_) { 1447 if (window_manager_internal_client_) {
1441 window_manager_internal_client_->RemoveAccelerator(id); 1448 window_manager_internal_client_->RemoveAccelerator(id);
1442 } 1449 }
1443 } 1450 }
1444 1451
1445 void WindowTreeClient::AddActivationParent(Window* window) { 1452 void WindowTreeClient::AddActivationParent(Window* window) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1594 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1588 this, capture_synchronizer_.get(), window)); 1595 this, capture_synchronizer_.get(), window));
1589 } 1596 }
1590 1597
1591 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1598 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1592 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1599 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1593 this, focus_synchronizer_.get(), window)); 1600 this, focus_synchronizer_.get(), window));
1594 } 1601 }
1595 1602
1596 } // namespace aura 1603 } // namespace aura
OLDNEW
« services/ui/ws/event_dispatcher_unittest.cc ('K') | « services/ui/ws/window_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698