| 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 #include "services/keyboard_native/keyboard_service_impl.h" | 5 #include "services/keyboard_native/keyboard_service_impl.h" |
| 6 | 6 |
| 7 namespace keyboard { | 7 namespace keyboard { |
| 8 | 8 |
| 9 KeyboardServiceImpl::KeyboardServiceImpl( | 9 KeyboardServiceImpl::KeyboardServiceImpl( |
| 10 mojo::InterfaceRequest<KeyboardService> request) | 10 mojo::InterfaceRequest<KeyboardService> request) |
| 11 : strong_binding_(this, request.Pass()), client_() { | 11 : strong_binding_(this, request.Pass()), client_() { |
| 12 } | 12 } |
| 13 | 13 |
| 14 KeyboardServiceImpl::~KeyboardServiceImpl() { | 14 KeyboardServiceImpl::~KeyboardServiceImpl() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 // KeyboardService implementation. | 17 // KeyboardService implementation. |
| 18 void KeyboardServiceImpl::Show(KeyboardClientPtr client, KeyboardType type) { | 18 void KeyboardServiceImpl::Show(KeyboardClientPtr client, KeyboardType type) { |
| 19 client_ = client.Pass(); | 19 client_ = client.Pass(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 void KeyboardServiceImpl::ShowByRequest() { | 22 void KeyboardServiceImpl::ShowByRequest() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void KeyboardServiceImpl::Hide() { | 25 void KeyboardServiceImpl::Hide() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void KeyboardServiceImpl::SetText(const mojo::String& text) { |
| 29 } |
| 30 |
| 31 void KeyboardServiceImpl::SetSelection(int32_t start, int32_t end) { |
| 32 } |
| 33 |
| 28 void KeyboardServiceImpl::OnKey(const char* key) { | 34 void KeyboardServiceImpl::OnKey(const char* key) { |
| 29 client_->CommitText(key, 1); | 35 client_->CommitText(key, 1); |
| 30 } | 36 } |
| 31 | 37 |
| 32 void KeyboardServiceImpl::OnDelete() { | 38 void KeyboardServiceImpl::OnDelete() { |
| 33 client_->DeleteSurroundingText(1, 0); | 39 client_->DeleteSurroundingText(1, 0); |
| 34 } | 40 } |
| 35 | 41 |
| 36 } // namespace keyboard | 42 } // namespace keyboard |
| OLD | NEW |