OLD | NEW |
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 "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "ui/base/ui_export.h" | 16 #include "ui/base/ui_base_export.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 namespace internal { | 20 namespace internal { |
21 class InputMethodDelegate; | 21 class InputMethodDelegate; |
22 class RemoteInputMethodDelegateWin; | 22 class RemoteInputMethodDelegateWin; |
23 } // namespace internal | 23 } // namespace internal |
24 | 24 |
25 class InputMethod; | 25 class InputMethod; |
26 struct CompositionText; | 26 struct CompositionText; |
(...skipping 12 matching lines...) Expand all Loading... |
39 // - Some IPC messages that represent actions to TextInputClient should be | 39 // - Some IPC messages that represent actions to TextInputClient should be |
40 // delegated to RemoteInputMethodPrivateWin so that RemoteInputMethodWin can | 40 // delegated to RemoteInputMethodPrivateWin so that RemoteInputMethodWin can |
41 // work as a real proxy. | 41 // work as a real proxy. |
42 | 42 |
43 // Returns true if |widget| requires RemoteInputMethodWin. | 43 // Returns true if |widget| requires RemoteInputMethodWin. |
44 bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget); | 44 bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget); |
45 | 45 |
46 // Returns the public interface of RemoteInputMethodWin. | 46 // Returns the public interface of RemoteInputMethodWin. |
47 // Caveats: Currently only one instance of RemoteInputMethodWin is able to run | 47 // Caveats: Currently only one instance of RemoteInputMethodWin is able to run |
48 // at the same time. | 48 // at the same time. |
49 UI_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin( | 49 UI_BASE_EXPORT scoped_ptr<InputMethod> CreateRemoteInputMethodWin( |
50 internal::InputMethodDelegate* delegate); | 50 internal::InputMethodDelegate* delegate); |
51 | 51 |
52 // Private interface of RemoteInputMethodWin. | 52 // Private interface of RemoteInputMethodWin. |
53 class UI_EXPORT RemoteInputMethodPrivateWin { | 53 class UI_BASE_EXPORT RemoteInputMethodPrivateWin { |
54 public: | 54 public: |
55 RemoteInputMethodPrivateWin(); | 55 RemoteInputMethodPrivateWin(); |
56 | 56 |
57 // Returns the private interface of RemoteInputMethodWin when and only when | 57 // Returns the private interface of RemoteInputMethodWin when and only when |
58 // |input_method| is instanciated via CreateRemoteInputMethodWin. Caller does | 58 // |input_method| is instanciated via CreateRemoteInputMethodWin. Caller does |
59 // not take the ownership of the returned object. | 59 // not take the ownership of the returned object. |
60 // As you might notice, this is yet another reinplementation of dynamic_cast | 60 // As you might notice, this is yet another reinplementation of dynamic_cast |
61 // or IUnknown::QueryInterface. | 61 // or IUnknown::QueryInterface. |
62 static RemoteInputMethodPrivateWin* Get(InputMethod* input_method); | 62 static RemoteInputMethodPrivateWin* Get(InputMethod* input_method); |
63 | 63 |
(...skipping 27 matching lines...) Expand all Loading... |
91 // type of the focused text input client is TEXT_INPUT_TYPE_NONE. | 91 // type of the focused text input client is TEXT_INPUT_TYPE_NONE. |
92 virtual void OnTextCommitted(const base::string16& text) = 0; | 92 virtual void OnTextCommitted(const base::string16& text) = 0; |
93 | 93 |
94 private: | 94 private: |
95 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodPrivateWin); | 95 DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodPrivateWin); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace ui | 98 } // namespace ui |
99 | 99 |
100 #endif // UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_ | 100 #endif // UI_BASE_IME_REMOTE_INPUT_METHOD_WIN_H_ |
OLD | NEW |