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

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

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Use std::move instead of Clone() 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
« no previous file with comments | « ui/aura/mus/DEPS ('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 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/auto_reset.h" 13 #include "base/auto_reset.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "services/service_manager/public/cpp/connector.h" 16 #include "services/service_manager/public/cpp/connector.h"
17 #include "services/ui/common/accelerator_util.h"
17 #include "services/ui/public/cpp/property_type_converters.h" 18 #include "services/ui/public/cpp/property_type_converters.h"
18 #include "services/ui/public/interfaces/constants.mojom.h" 19 #include "services/ui/public/interfaces/constants.mojom.h"
19 #include "services/ui/public/interfaces/window_manager.mojom.h" 20 #include "services/ui/public/interfaces/window_manager.mojom.h"
20 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h" 21 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h"
21 #include "ui/aura/client/aura_constants.h" 22 #include "ui/aura/client/aura_constants.h"
22 #include "ui/aura/client/drag_drop_client.h" 23 #include "ui/aura/client/drag_drop_client.h"
23 #include "ui/aura/client/transient_window_client.h" 24 #include "ui/aura/client/transient_window_client.h"
24 #include "ui/aura/mus/capture_synchronizer.h" 25 #include "ui/aura/mus/capture_synchronizer.h"
25 #include "ui/aura/mus/drag_drop_controller_mus.h" 26 #include "ui/aura/mus/drag_drop_controller_mus.h"
26 #include "ui/aura/mus/focus_synchronizer.h" 27 #include "ui/aura/mus/focus_synchronizer.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 ui::mojom::Cursor cursor_id) { 1437 ui::mojom::Cursor cursor_id) {
1437 window_manager_internal_client_->WmSetNonClientCursor( 1438 window_manager_internal_client_->WmSetNonClientCursor(
1438 WindowMus::Get(window)->server_id(), cursor_id); 1439 WindowMus::Get(window)->server_id(), cursor_id);
1439 } 1440 }
1440 1441
1441 void WindowTreeClient::AddAccelerator( 1442 void WindowTreeClient::AddAccelerator(
1442 uint32_t id, 1443 uint32_t id,
1443 ui::mojom::EventMatcherPtr event_matcher, 1444 ui::mojom::EventMatcherPtr event_matcher,
1444 const base::Callback<void(bool)>& callback) { 1445 const base::Callback<void(bool)>& callback) {
1445 if (window_manager_internal_client_) { 1446 if (window_manager_internal_client_) {
1446 window_manager_internal_client_->AddAccelerator( 1447 window_manager_internal_client_->AddAccelerators(
1447 id, std::move(event_matcher), callback); 1448 ui::CreateAcceleratorVector(id, std::move(event_matcher)), callback);
1448 } 1449 }
1449 } 1450 }
1450 1451
1451 void WindowTreeClient::RemoveAccelerator(uint32_t id) { 1452 void WindowTreeClient::RemoveAccelerator(uint32_t id) {
1452 if (window_manager_internal_client_) { 1453 if (window_manager_internal_client_) {
1453 window_manager_internal_client_->RemoveAccelerator(id); 1454 window_manager_internal_client_->RemoveAccelerator(id);
1454 } 1455 }
1455 } 1456 }
1456 1457
1457 void WindowTreeClient::AddActivationParent(Window* window) { 1458 void WindowTreeClient::AddActivationParent(Window* window) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1607 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1607 this, capture_synchronizer_.get(), window)); 1608 this, capture_synchronizer_.get(), window));
1608 } 1609 }
1609 1610
1610 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1611 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1611 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1612 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1612 this, focus_synchronizer_.get(), window)); 1613 this, focus_synchronizer_.get(), window));
1613 } 1614 }
1614 1615
1615 } // namespace aura 1616 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698