Chromium Code Reviews| Index: mojo/ui/input_handler.cc |
| diff --git a/mojo/ui/input_handler.cc b/mojo/ui/input_handler.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7eb06f8787e97d14db16a001b016f49c273e23f0 |
| --- /dev/null |
| +++ b/mojo/ui/input_handler.cc |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "mojo/ui/input_handler.h" |
| + |
| +#include "base/logging.h" |
| +#include "mojo/public/cpp/application/connect.h" |
| + |
| +namespace mojo { |
| +namespace ui { |
| + |
| +InputHandler::InputHandler(mojo::ServiceProvider* service_provider, |
| + mojo::ui::InputListener* listener) |
| + : listener_binding_(listener) { |
| + DCHECK(service_provider); |
| + DCHECK(listener); |
| + |
| + mojo::ConnectToService(service_provider, &connection_); |
| + |
| + mojo::ui::InputListenerPtr listener_ptr; |
| + listener_binding_.Bind(mojo::GetProxy(&listener_ptr)); |
| + connection_->SetListener(listener_ptr.Pass()); |
| +} |
| + |
| +InputHandler::~InputHandler() {} |
|
abarth
2016/01/10 23:23:39
I'd skip this class too. It's just obfuscating wh
jeffbrown
2016/01/26 07:25:15
This is about to get much more interesting (we'll
|
| + |
| +} // namespace ui |
| +} // namespace mojo |