OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIN_TSF_EVENT_ROUTER_H_ | 5 #ifndef UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ |
6 #define UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ | 6 #define UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 #include <msctf.h> | 10 #include <msctf.h> |
11 | 11 |
12 #include <set> | 12 #include <set> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "ui/base/ime/text_input_type.h" | 17 #include "ui/base/ime/text_input_type.h" |
18 #include "ui/base/ui_export.h" | 18 #include "ui/base/ui_base_export.h" |
19 #include "ui/gfx/range/range.h" | 19 #include "ui/gfx/range/range.h" |
20 | 20 |
21 struct ITfDocumentMgr; | 21 struct ITfDocumentMgr; |
22 | 22 |
23 namespace ui { | 23 namespace ui { |
24 | 24 |
25 class TSFEventRouterObserver { | 25 class TSFEventRouterObserver { |
26 public: | 26 public: |
27 TSFEventRouterObserver() {} | 27 TSFEventRouterObserver() {} |
28 | 28 |
(...skipping 12 matching lines...) Expand all Loading... |
41 | 41 |
42 protected: | 42 protected: |
43 virtual ~TSFEventRouterObserver() {} | 43 virtual ~TSFEventRouterObserver() {} |
44 | 44 |
45 private: | 45 private: |
46 DISALLOW_COPY_AND_ASSIGN(TSFEventRouterObserver); | 46 DISALLOW_COPY_AND_ASSIGN(TSFEventRouterObserver); |
47 }; | 47 }; |
48 | 48 |
49 // This class monitores TSF related events and forwards them to given | 49 // This class monitores TSF related events and forwards them to given |
50 // |observer|. | 50 // |observer|. |
51 class UI_EXPORT TSFEventRouter { | 51 class UI_BASE_EXPORT TSFEventRouter { |
52 public: | 52 public: |
53 // Do not pass NULL to |observer|. | 53 // Do not pass NULL to |observer|. |
54 explicit TSFEventRouter(TSFEventRouterObserver* observer); | 54 explicit TSFEventRouter(TSFEventRouterObserver* observer); |
55 virtual ~TSFEventRouter(); | 55 virtual ~TSFEventRouter(); |
56 | 56 |
57 // Returns true if the IME is composing text. | 57 // Returns true if the IME is composing text. |
58 bool IsImeComposing(); | 58 bool IsImeComposing(); |
59 | 59 |
60 // Callbacks from the TSFEventRouterDelegate: | 60 // Callbacks from the TSFEventRouterDelegate: |
61 void OnCandidateWindowCountChanged(size_t window_count); | 61 void OnCandidateWindowCountChanged(size_t window_count); |
(...skipping 10 matching lines...) Expand all Loading... |
72 CComPtr<Delegate> delegate_; | 72 CComPtr<Delegate> delegate_; |
73 | 73 |
74 TSFEventRouterObserver* observer_; | 74 TSFEventRouterObserver* observer_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(TSFEventRouter); | 76 DISALLOW_COPY_AND_ASSIGN(TSFEventRouter); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace ui | 79 } // namespace ui |
80 | 80 |
81 #endif // UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ | 81 #endif // UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_ |
OLD | NEW |