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

Side by Side Diff: components/mus/public/cpp/tests/window_server_test_base.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/tests/window_server_test_base.h" 5 #include "components/mus/public/cpp/tests/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 : true; 113 : true;
114 } 114 }
115 115
116 Window* WindowServerTestBase::OnWmCreateTopLevelWindow( 116 Window* WindowServerTestBase::OnWmCreateTopLevelWindow(
117 std::map<std::string, std::vector<uint8_t>>* properties) { 117 std::map<std::string, std::vector<uint8_t>>* properties) {
118 return window_manager_delegate_ 118 return window_manager_delegate_
119 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties) 119 ? window_manager_delegate_->OnWmCreateTopLevelWindow(properties)
120 : nullptr; 120 : nullptr;
121 } 121 }
122 122
123 void WindowServerTestBase::OnAccelerator(uint32_t id, mojom::EventPtr event) {
124 if (window_manager_delegate_)
125 window_manager_delegate_->OnAccelerator(id, std::move(event));
126 }
127
123 void WindowServerTestBase::Create( 128 void WindowServerTestBase::Create(
124 mojo::ApplicationConnection* connection, 129 mojo::ApplicationConnection* connection,
125 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 130 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
126 WindowTreeConnection::Create( 131 WindowTreeConnection::Create(
127 this, std::move(request), 132 this, std::move(request),
128 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED); 133 WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED);
129 } 134 }
130 135
131 } // namespace mus 136 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.h ('k') | components/mus/public/cpp/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698