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

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

Issue 53553003: WIP: Ash IME support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/language_profile_observer.h ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/ime/text_service.h
diff --git a/win8/metro_driver/ime/text_service.h b/win8/metro_driver/ime/text_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..e915a9e302a3fd39338a75537463c1ca4b5bdf94
--- /dev/null
+++ b/win8/metro_driver/ime/text_service.h
@@ -0,0 +1,49 @@
+// 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_H_
+#define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
+
+#include <Windows.h>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace metro_driver {
+
+class TextStoreDelegate;
+
+// A high level interface to interact with virtual text store built on top of
+// Text Services Framewors (TSF).
+class TextService {
+ public:
+ TextService(HWND window_handle, TextStoreDelegate* text_store_delegate);
+ ~TextService();
+
+ // Cancels on-going composition. Does nothing if there is no composition.
+ void CancelComposition();
+
+ // Updates document type with |input_scopes|. An empty |input_scopes|
+ // represents IMEs should be disabled until non-empty |input_scopes| is
+ // specified.
+ // Note: |input_scopes| is defined as std::vector<int32> here rather than
+ // std::vector<InputScope> because the wire format of IPC message
+ // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to
+ // avoid dependency on <InputScope.h> header.
+ void OnDocumentTypeChanged(const std::vector<int32>& input_scopes);
+
+ // Notifies TSF that the attached window gains keyboard focus.
+ void OnWindowActivated();
+
+ private:
+ struct InternalState;
+ scoped_ptr<InternalState> state_;
+
+ DISALLOW_COPY_AND_ASSIGN(TextService);
+};
+
+} // namespace metro_driver
+
+#endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
« no previous file with comments | « win8/metro_driver/ime/language_profile_observer.h ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698