Chromium Code Reviews| Index: services/keyboard_native/keyboard_service_impl.h |
| diff --git a/services/keyboard_native/keyboard_service_impl.h b/services/keyboard_native/keyboard_service_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2d1cb42c79f9ee46ed42738cbda9ef5dd40a8a8f |
| --- /dev/null |
| +++ b/services/keyboard_native/keyboard_service_impl.h |
| @@ -0,0 +1,45 @@ |
| +// 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 "base/memory/scoped_ptr.h" |
|
jamesr
2015/05/08 23:45:24
i think you aren't using most of these includes -
APW
2015/05/09 00:45:59
Done.
|
| +#include "base/memory/scoped_vector.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "mojo/common/weak_binding_set.h" |
| +#include "mojo/public/cpp/application/application_connection.h" |
| +#include "mojo/public/cpp/application/application_delegate.h" |
| +#include "mojo/public/cpp/application/application_runner.h" |
| +#include "mojo/public/cpp/application/interface_factory.h" |
| +#include "mojo/public/cpp/bindings/interface_request.h" |
| +#include "mojo/public/cpp/bindings/strong_binding.h" |
| +#include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" |
| + |
| +namespace keyboard { |
| + |
| +class KeyboardServiceDelegate : public mojo::ApplicationDelegate, |
|
jamesr
2015/05/08 23:45:24
i would probably move this class and the MojoMain
APW
2015/05/09 00:45:59
Done.
|
| + public mojo::InterfaceFactory<KeyboardService> { |
| + public: |
| + // ApplicationDelegate implementation. |
| + bool ConfigureIncomingConnection( |
| + mojo::ApplicationConnection* connection) override; |
| + |
| + // InterfaceFactory<KeyboardService> implementation. |
| + void Create(mojo::ApplicationConnection* connection, |
| + mojo::InterfaceRequest<KeyboardService> request) override; |
| +}; |
| + |
| +class KeyboardServiceImpl : public KeyboardService { |
| + public: |
| + KeyboardServiceImpl(mojo::InterfaceRequest<KeyboardService> handle); |
|
jamesr
2015/05/08 23:45:24
add the 'explicit' keyword for one-argument constr
APW
2015/05/09 00:45:59
Done.
|
| + ~KeyboardServiceImpl() override; |
| + |
| + // KeyboardService implementation. |
| + void Show(KeyboardClientPtr client) override; |
| + void ShowByRequest() override; |
| + void Hide() override; |
| + |
| + private: |
| + mojo::StrongBinding<KeyboardService> strong_binding_; |
| +}; |
| + |
| +} // namespace keyboard |