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

Side by Side Diff: win8/metro_driver/ime/text_service.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 unified diff | Download patch
« no previous file with comments | « win8/metro_driver/ime/input_scope.cc ('k') | win8/metro_driver/ime/text_service.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 (c) 2013 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 #ifndef WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
6 #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
7
8 #include <Windows.h>
9
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h"
14
15 namespace metro_viewer {
16 struct CharacterBounds;
17 }
18
19 namespace metro_driver {
20
21 class TextServiceDelegate;
22
23 // An interface to manage a virtual text store with which an IME communicates.
24 class TextService {
25 public:
26 virtual ~TextService() {}
27
28 // Cancels on-going composition. Does nothing if there is no composition.
29 virtual void CancelComposition() = 0;
30
31 // Updates document type with |input_scopes| and caret/composition position
32 // with |character_bounds|. An empty |input_scopes| indicates that IMEs
33 // should be disabled until non-empty |input_scopes| is specified.
34 // Note: |input_scopes| is defined as std::vector<int32> here rather than
35 // std::vector<InputScope> because the wire format of IPC message
36 // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to
37 // avoid dependency on <InputScope.h> header.
38 virtual void OnDocumentChanged(
39 const std::vector<int32>& input_scopes,
40 const std::vector<metro_viewer::CharacterBounds>& character_bounds) = 0;
41
42 // Must be called whenever the attached window gains keyboard focus.
43 virtual void OnWindowActivated() = 0;
44 };
45
46 // Returns an instance of TextService that works together with
47 // |text_store_delegate| as if it was an text area owned by |window_handle|.
48 scoped_ptr<TextService>
49 CreateTextService(TextServiceDelegate* delegate, HWND window_handle);
50
51 } // namespace metro_driver
52
53 #endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_
OLDNEW
« no previous file with comments | « win8/metro_driver/ime/input_scope.cc ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698