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

Side by Side Diff: services/ui/public/cpp/window_tree_client.cc

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Add CreateAcceleratorTransport and rename helper to CreateAcceleratorVector. Add one more test case… 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 "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 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 std::move(values)); 1427 std::move(values));
1428 } 1428 }
1429 } 1429 }
1430 1430
1431 void WindowTreeClient::SetNonClientCursor(Window* window, 1431 void WindowTreeClient::SetNonClientCursor(Window* window,
1432 ui::mojom::Cursor cursor_id) { 1432 ui::mojom::Cursor cursor_id) {
1433 window_manager_internal_client_->WmSetNonClientCursor(server_id(window), 1433 window_manager_internal_client_->WmSetNonClientCursor(server_id(window),
1434 cursor_id); 1434 cursor_id);
1435 } 1435 }
1436 1436
1437 void WindowTreeClient::AddAccelerator( 1437 void WindowTreeClient::AddAccelerators(
1438 uint32_t id, 1438 std::vector<mojom::AcceleratorTransportPtr> accelerators,
1439 mojom::EventMatcherPtr event_matcher,
1440 const base::Callback<void(bool)>& callback) { 1439 const base::Callback<void(bool)>& callback) {
1441 if (window_manager_internal_client_) { 1440 if (window_manager_internal_client_) {
1442 window_manager_internal_client_->AddAccelerator( 1441 window_manager_internal_client_->AddAccelerators(std::move(accelerators),
1443 id, std::move(event_matcher), callback); 1442 callback);
1444 } 1443 }
1445 } 1444 }
1446 1445
1447 void WindowTreeClient::RemoveAccelerator(uint32_t id) { 1446 void WindowTreeClient::RemoveAccelerator(uint32_t id) {
1448 if (window_manager_internal_client_) { 1447 if (window_manager_internal_client_) {
1449 window_manager_internal_client_->RemoveAccelerator(id); 1448 window_manager_internal_client_->RemoveAccelerator(id);
1450 } 1449 }
1451 } 1450 }
1452 1451
1453 void WindowTreeClient::AddActivationParent(Window* window) { 1452 void WindowTreeClient::AddActivationParent(Window* window) {
(...skipping 19 matching lines...) Expand all
1473 // TODO(riajiang): Figure out if |offset| needs to be converted. 1472 // TODO(riajiang): Figure out if |offset| needs to be converted.
1474 // (http://crbugs.com/646932) 1473 // (http://crbugs.com/646932)
1475 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1474 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1476 server_id(window), offset.x(), offset.y(), 1475 server_id(window), offset.x(), offset.y(),
1477 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), 1476 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()),
1478 hit_area)); 1477 hit_area));
1479 } 1478 }
1480 } 1479 }
1481 1480
1482 } // namespace ui 1481 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698