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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1656123002: Moves accelerator registration to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mandoline Created 4 years, 10 months 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 "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 uint32_t change_id, 884 uint32_t change_id,
885 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { 885 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) {
886 std::map<std::string, std::vector<uint8_t>> properties = 886 std::map<std::string, std::vector<uint8_t>> properties =
887 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); 887 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>();
888 Window* window = 888 Window* window =
889 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties); 889 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties);
890 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id, 890 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id,
891 window->id()); 891 window->id());
892 } 892 }
893 893
894 void WindowTreeClientImpl::OnAccelerator(uint32_t id, mojom::EventPtr event) {
895 window_manager_delegate_->OnAccelerator(id, std::move(event));
896 }
897
894 void WindowTreeClientImpl::SetFrameDecorationValues( 898 void WindowTreeClientImpl::SetFrameDecorationValues(
895 mojom::FrameDecorationValuesPtr values) { 899 mojom::FrameDecorationValuesPtr values) {
896 window_manager_internal_client_->WmSetFrameDecorationValues( 900 window_manager_internal_client_->WmSetFrameDecorationValues(
897 std::move(values)); 901 std::move(values));
898 } 902 }
899 903
904 void WindowTreeClientImpl::AddAccelerator(
905 uint32_t id,
906 mojom::EventMatcherPtr event_matcher,
907 const base::Callback<void(bool)>& callback) {
908 window_manager_internal_client_->AddAccelerator(id, std::move(event_matcher),
909 callback);
910 }
911
912 void WindowTreeClientImpl::RemoveAccelerator(uint32_t id) {
913 window_manager_internal_client_->RemoveAccelerator(id);
914 }
915
900 } // namespace mus 916 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window_tree_client_impl.h ('k') | components/mus/public/cpp/tests/window_server_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698