OLD | NEW |
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 #ifndef SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ | 5 #ifndef SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ |
6 #define SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ | 6 #define SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "mojo/public/cpp/bindings/interface_request.h" | 9 #include "mojo/public/cpp/bindings/interface_request.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
11 #include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" | 11 #include "mojo/services/keyboard/interfaces/keyboard.mojom.h" |
12 #include "services/keyboard_native/view_observer_delegate.h" | 12 #include "services/keyboard_native/view_observer_delegate.h" |
13 | 13 |
14 namespace keyboard { | 14 namespace keyboard { |
15 | 15 |
16 class KeyboardServiceImpl : public KeyboardService { | 16 class KeyboardServiceImpl : public KeyboardService { |
17 public: | 17 public: |
18 explicit KeyboardServiceImpl(mojo::InterfaceRequest<KeyboardService> request); | 18 explicit KeyboardServiceImpl(mojo::InterfaceRequest<KeyboardService> request); |
19 ~KeyboardServiceImpl() override; | 19 ~KeyboardServiceImpl() override; |
20 | 20 |
21 // KeyboardService implementation. | 21 // KeyboardService implementation. |
22 void Show(KeyboardClientPtr client, KeyboardType type) override; | 22 void Show(KeyboardClientPtr client, KeyboardType type) override; |
23 void ShowByRequest() override; | 23 void ShowByRequest() override; |
24 void Hide() override; | 24 void Hide() override; |
25 | 25 |
26 void OnKey(const char* key); | 26 void OnKey(const char* key); |
27 void OnDelete(); | 27 void OnDelete(); |
28 | 28 |
29 private: | 29 private: |
30 mojo::StrongBinding<KeyboardService> strong_binding_; | 30 mojo::StrongBinding<KeyboardService> strong_binding_; |
31 KeyboardClientPtr client_; | 31 KeyboardClientPtr client_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(KeyboardServiceImpl); | 33 DISALLOW_COPY_AND_ASSIGN(KeyboardServiceImpl); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace keyboard | 36 } // namespace keyboard |
37 | 37 |
38 #endif // SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ | 38 #endif // SERVICES_KEYBOARD_NATIVE_KEYBOARD_SERVICE_IMPL_H_ |
OLD | NEW |