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

Unified Diff: win8/metro_driver/ime/text_service_delegate.h

Issue 83233002: Enable basic IME functionality under Ash on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix warnings (that are treated as an error) on 64-bit build Created 7 years 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 | « win8/metro_driver/ime/text_service.cc ('k') | win8/metro_driver/ime/text_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/ime/text_service_delegate.h
diff --git a/win8/metro_driver/ime/text_service_delegate.h b/win8/metro_driver/ime/text_service_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..296ec2a856aeca5ece0e7a0e36d182835c2f609e
--- /dev/null
+++ b/win8/metro_driver/ime/text_service_delegate.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 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.
+
+#ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_
+#define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/strings/string16.h"
+
+namespace metro_viewer {
+struct UnderlineInfo;
+}
+
+namespace metro_driver {
+
+// A delegate which works together with virtual text service.
+// Objects that implement this delegate will receive notifications from a
+// virtual text service whenever an IME updates the composition or commits text.
+class TextServiceDelegate {
+ public:
+ virtual ~TextServiceDelegate() {}
+
+ // Called when on-going composition is updated. An empty |text| represents
+ // that the composition is canceled.
+ virtual void OnCompositionChanged(
+ const string16& text,
+ int32 selection_start,
+ int32 selection_end,
+ const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0;
+
+ // Called when |text| is committed.
+ virtual void OnTextCommitted(const string16& text) = 0;
+};
+
+} // namespace metro_driver
+
+#endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_DELEGATE_H_
« no previous file with comments | « win8/metro_driver/ime/text_service.cc ('k') | win8/metro_driver/ime/text_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698