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

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

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Forget to add these files to previous patch. 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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 std::move(values)); 1429 std::move(values));
1430 } 1430 }
1431 } 1431 }
1432 1432
1433 void WindowTreeClient::SetNonClientCursor(Window* window, 1433 void WindowTreeClient::SetNonClientCursor(Window* window,
1434 ui::mojom::Cursor cursor_id) { 1434 ui::mojom::Cursor cursor_id) {
1435 window_manager_internal_client_->WmSetNonClientCursor(server_id(window), 1435 window_manager_internal_client_->WmSetNonClientCursor(server_id(window),
1436 cursor_id); 1436 cursor_id);
1437 } 1437 }
1438 1438
1439 void WindowTreeClient::AddAccelerator( 1439 void WindowTreeClient::AddAccelerator(
mfomitchev 2016/11/22 22:44:16 nit: AddAccelerators
thanhph 2016/11/24 16:10:13 Done.
1440 uint32_t id, 1440 mojo::Array<mojom::AcceleratorEventPtr> multi_accelerators,
mfomitchev 2016/11/22 22:44:16 Try to be consistent in naming: you are using acce
thanhph 2016/11/24 16:10:13 Done, I use multi_accelerators as the main name.
1441 mojom::EventMatcherPtr event_matcher,
1442 const base::Callback<void(bool)>& callback) { 1441 const base::Callback<void(bool)>& callback) {
1443 if (window_manager_internal_client_) { 1442 if (window_manager_internal_client_) {
1444 window_manager_internal_client_->AddAccelerator( 1443 window_manager_internal_client_->AddAccelerator(
1445 id, std::move(event_matcher), callback); 1444 std::move(multi_accelerators), callback);
1446 } 1445 }
1447 } 1446 }
1448 1447
1449 void WindowTreeClient::RemoveAccelerator(uint32_t id) { 1448 void WindowTreeClient::RemoveAccelerator(uint32_t id) {
1450 if (window_manager_internal_client_) { 1449 if (window_manager_internal_client_) {
1451 window_manager_internal_client_->RemoveAccelerator(id); 1450 window_manager_internal_client_->RemoveAccelerator(id);
1452 } 1451 }
1453 } 1452 }
1454 1453
1455 void WindowTreeClient::AddActivationParent(Window* window) { 1454 void WindowTreeClient::AddActivationParent(Window* window) {
(...skipping 19 matching lines...) Expand all
1475 // TODO(riajiang): Figure out if |offset| needs to be converted. 1474 // TODO(riajiang): Figure out if |offset| needs to be converted.
1476 // (http://crbugs.com/646932) 1475 // (http://crbugs.com/646932)
1477 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1476 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1478 server_id(window), offset.x(), offset.y(), 1477 server_id(window), offset.x(), offset.y(),
1479 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), 1478 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()),
1480 hit_area)); 1479 hit_area));
1481 } 1480 }
1482 } 1481 }
1483 1482
1484 } // namespace ui 1483 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698