Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #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.
| |
| 6 #include "base/memory/scoped_vector.h" | |
| 7 #include "base/memory/weak_ptr.h" | |
| 8 #include "mojo/common/weak_binding_set.h" | |
| 9 #include "mojo/public/cpp/application/application_connection.h" | |
| 10 #include "mojo/public/cpp/application/application_delegate.h" | |
| 11 #include "mojo/public/cpp/application/application_runner.h" | |
| 12 #include "mojo/public/cpp/application/interface_factory.h" | |
| 13 #include "mojo/public/cpp/bindings/interface_request.h" | |
| 14 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 15 #include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" | |
| 16 | |
| 17 namespace keyboard { | |
| 18 | |
| 19 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.
| |
| 20 public mojo::InterfaceFactory<KeyboardService> { | |
| 21 public: | |
| 22 // ApplicationDelegate implementation. | |
| 23 bool ConfigureIncomingConnection( | |
| 24 mojo::ApplicationConnection* connection) override; | |
| 25 | |
| 26 // InterfaceFactory<KeyboardService> implementation. | |
| 27 void Create(mojo::ApplicationConnection* connection, | |
| 28 mojo::InterfaceRequest<KeyboardService> request) override; | |
| 29 }; | |
| 30 | |
| 31 class KeyboardServiceImpl : public KeyboardService { | |
| 32 public: | |
| 33 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.
| |
| 34 ~KeyboardServiceImpl() override; | |
| 35 | |
| 36 // KeyboardService implementation. | |
| 37 void Show(KeyboardClientPtr client) override; | |
| 38 void ShowByRequest() override; | |
| 39 void Hide() override; | |
| 40 | |
| 41 private: | |
| 42 mojo::StrongBinding<KeyboardService> strong_binding_; | |
| 43 }; | |
| 44 | |
| 45 } // namespace keyboard | |
| OLD | NEW |