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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/keyboard_native/keyboard_service_impl.cc
diff --git a/services/keyboard_native/keyboard_service_impl.cc b/services/keyboard_native/keyboard_service_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d01970f4864f87b8c70d6390f6c27a6a14eb46b3
--- /dev/null
+++ b/services/keyboard_native/keyboard_service_impl.cc
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/keyboard_native/keyboard_service_impl.h"
+
+namespace keyboard {
+
+KeyboardServiceImpl::KeyboardServiceImpl(
+ mojo::InterfaceRequest<KeyboardService> request)
+ : strong_binding_(this, request.Pass()) {
+}
+
+KeyboardServiceImpl::~KeyboardServiceImpl() {
+}
+
+// KeyboardService implementation.
+void KeyboardServiceImpl::Show(KeyboardClientPtr client) {
+ keyboard::CompletionData completion_data;
+ completion_data.text = "blah";
+ completion_data.label = "blahblah";
+ client->CommitCompletion(completion_data.Clone());
+
+ keyboard::CorrectionData correction_data;
+ correction_data.old_text = "old text";
+ correction_data.new_text = "new text";
+ client->CommitCorrection(correction_data.Clone());
+
+ client->CommitText("", 0);
+ client->DeleteSurroundingText(0, 0);
+ client->SetComposingRegion(0, 0);
+ client->SetComposingText("", 0);
+ client->SetSelection(0, 1);
+}
+
+void KeyboardServiceImpl::ShowByRequest() {
+}
+
+void KeyboardServiceImpl::Hide() {
+}
+
+} // namespace keyboard
« 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