Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: services/keyboard_native/keyboard_service_impl.cc

Issue 1139453002: Initial native keyboard proof of concept. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Addressed comments. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/keyboard_native/keyboard_service_impl.h ('k') | services/keyboard_native/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « services/keyboard_native/keyboard_service_impl.h ('k') | services/keyboard_native/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698