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

Side by Side Diff: ui/base/ime/remote_input_method_win.h

Issue 80263005: Use RemoteInputMethodWin in production (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ui/base/ime/input_method_factory.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_ 5 #ifndef UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_
6 #define UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_ 6 #define UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_
7 7
8 #include <Windows.h> 8 #include <Windows.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "ui/base/ui_export.h" 15 #include "ui/base/ui_export.h"
16 #include "ui/gfx/native_widget_types.h"
16 17
17 namespace ui { 18 namespace ui {
18 namespace internal { 19 namespace internal {
19 class InputMethodDelegate; 20 class InputMethodDelegate;
20 class RemoteInputMethodDelegateWin; 21 class RemoteInputMethodDelegateWin;
21 } // namespace internal 22 } // namespace internal
22 23
23 class InputMethod; 24 class InputMethod;
24 25
25 // RemoteInputMethodWin is a special implementation of ui::InputMethod that 26 // RemoteInputMethodWin is a special implementation of ui::InputMethod that
26 // works as a proxy of an IME handler running in the metro_driver process. 27 // works as a proxy of an IME handler running in the metro_driver process.
27 // RemoteInputMethodWin works as follows. 28 // RemoteInputMethodWin works as follows.
28 // - Any action to RemoteInputMethodPrivateWin should be delegated to the 29 // - Any action to RemoteInputMethodPrivateWin should be delegated to the
29 // metro_driver process via RemoteInputMethodDelegateWin. 30 // metro_driver process via RemoteInputMethodDelegateWin.
30 // - Data retrieval from RemoteInputMethodPrivateWin is implemented with 31 // - Data retrieval from RemoteInputMethodPrivateWin is implemented with
31 // data cache. Whenever the IME state in the metro_driver process is changed, 32 // data cache. Whenever the IME state in the metro_driver process is changed,
32 // RemoteRootWindowHostWin, which receives IPCs from metro_driver process, 33 // RemoteRootWindowHostWin, which receives IPCs from metro_driver process,
33 // will call RemoteInputMethodPrivateWin::OnCandidatePopupChanged and/or 34 // will call RemoteInputMethodPrivateWin::OnCandidatePopupChanged and/or
34 // RemoteInputMethodPrivateWin::OnInputSourceChanged accordingly so that 35 // RemoteInputMethodPrivateWin::OnInputSourceChanged accordingly so that
35 // the state cache should be updated. 36 // the state cache should be updated.
36 37
38 // Returns true if |widget| requires RemoteInputMethodWin.
39 bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget);
40
37 // Returns the public interface of RemoteInputMethodWin. 41 // Returns the public interface of RemoteInputMethodWin.
38 // Caveats: Currently only one instance of RemoteInputMethodWin is able to run 42 // Caveats: Currently only one instance of RemoteInputMethodWin is able to run
39 // at the same time. 43 // at the same time.
40 UI_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin( 44 UI_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin(
41 internal::InputMethodDelegate* delegate); 45 internal::InputMethodDelegate* delegate);
42 46
43 // Private interface of RemoteInputMethodWin. 47 // Private interface of RemoteInputMethodWin.
44 class UI_EXPORT RemoteInputMethodPrivateWin { 48 class UI_EXPORT RemoteInputMethodPrivateWin {
45 public: 49 public:
46 RemoteInputMethodPrivateWin(); 50 RemoteInputMethodPrivateWin();
(...skipping 21 matching lines...) Expand all
68 // values based on remote IME activities in the metro_driver process. 72 // values based on remote IME activities in the metro_driver process.
69 virtual void OnInputSourceChanged(LANGID langid, bool is_ime) = 0; 73 virtual void OnInputSourceChanged(LANGID langid, bool is_ime) = 0;
70 74
71 private: 75 private:
72 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodPrivateWin); 76 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodPrivateWin);
73 }; 77 };
74 78
75 } // namespace ui 79 } // namespace ui
76 80
77 #endif // UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_ 81 #endif // UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_factory.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698