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 "services/keyboard_native/keyboard_service_impl.h" |
| 6 |
| 7 namespace keyboard { |
| 8 |
| 9 KeyboardServiceImpl::KeyboardServiceImpl( |
| 10 mojo::InterfaceRequest<KeyboardService> request) |
| 11 : strong_binding_(this, request.Pass()) { |
| 12 } |
| 13 |
| 14 KeyboardServiceImpl::~KeyboardServiceImpl() { |
| 15 } |
| 16 |
| 17 // KeyboardService implementation. |
| 18 void KeyboardServiceImpl::Show(KeyboardClientPtr client) { |
| 19 keyboard::CompletionData completion_data; |
| 20 completion_data.text = "blah"; |
| 21 completion_data.label = "blahblah"; |
| 22 client->CommitCompletion(completion_data.Clone()); |
| 23 |
| 24 keyboard::CorrectionData correction_data; |
| 25 correction_data.old_text = "old text"; |
| 26 correction_data.new_text = "new text"; |
| 27 client->CommitCorrection(correction_data.Clone()); |
| 28 |
| 29 client->CommitText("", 0); |
| 30 client->DeleteSurroundingText(0, 0); |
| 31 client->SetComposingRegion(0, 0); |
| 32 client->SetComposingText("", 0); |
| 33 client->SetSelection(0, 1); |
| 34 } |
| 35 |
| 36 void KeyboardServiceImpl::ShowByRequest() { |
| 37 } |
| 38 |
| 39 void KeyboardServiceImpl::Hide() { |
| 40 } |
| 41 |
| 42 } // namespace keyboard |
OLD | NEW |