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 #ifndef SERVICES_KEYBOARD_LINUX_KEYBOARD_SERVICE_IMPL_H_ | |
| 6 #define SERVICES_KEYBOARD_LINUX_KEYBOARD_SERVICE_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "mojo/public/cpp/application/interface_factory.h" | |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 11 #include "mojo/public/interfaces/application/shell.mojom.h" | |
| 12 #include "mojo/services/keyboard/interfaces/keyboard.mojom.h" | |
| 13 #include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h" | |
| 14 | |
| 15 namespace keyboard { | |
| 16 | |
| 17 class LinuxKeyboardServiceImpl : public ::keyboard::KeyboardService, | |
|
jamesr
2015/11/19 23:47:33
omit the :: in "::keyboard"
| |
| 18 public mojo::NativeViewportEventDispatcher { | |
| 19 public: | |
| 20 explicit LinuxKeyboardServiceImpl( | |
|
jamesr
2015/11/19 23:47:33
only say 'explicit' if it's a one-argument constru
| |
| 21 mojo::InterfaceRequest<::keyboard::KeyboardService> request, | |
| 22 mojo::InterfaceRequest<NativeViewportEventDispatcher> dispatcher); | |
| 23 ~LinuxKeyboardServiceImpl() override; | |
| 24 void Show(::keyboard::KeyboardClientPtr client, | |
|
jamesr
2015/11/19 23:47:33
nit: put a blank line and a comment before these i
| |
| 25 ::keyboard::KeyboardType type) override; | |
| 26 void ShowByRequest() override; | |
| 27 void Hide() override; | |
| 28 void SetText(const mojo::String& text) override; | |
| 29 void SetSelection(int32_t start, int32_t end) override; | |
| 30 | |
| 31 void OnEvent(mojo::EventPtr event, | |
|
jamesr
2015/11/19 23:47:33
ditto here: "// mojo::NativeViewportEventDispatche
| |
| 32 const mojo::Callback<void()>& callback) override; | |
| 33 | |
| 34 private: | |
| 35 mojo::Shell* shell_; | |
| 36 mojo::ApplicationConnection* connection_; | |
| 37 mojo::StrongBinding<::keyboard::KeyboardService> binding_; | |
| 38 mojo::Binding<mojo::NativeViewportEventDispatcher> event_dispatcher_binding_; | |
| 39 | |
| 40 ::keyboard::KeyboardClientPtr client_; | |
| 41 std::string text_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(LinuxKeyboardServiceImpl); | |
| 44 }; | |
| 45 | |
| 46 } // namespace keyboard | |
| 47 | |
| 48 #endif /* defined(SERVICES_KEYBOARD_LINUX_KEYBOARD_SERVICE_IMPL_H_) */ | |
| OLD | NEW |