Chromium Code Reviews| Index: ui/base/ime/win/tsf_event_router.h |
| diff --git a/ui/base/ime/win/tsf_event_router.h b/ui/base/ime/win/tsf_event_router.h |
| index e16df27d5e15fe47788ba9c60ed941695738c385..3be2fe2ba2cf691765f953ba2481797f9095a89a 100644 |
| --- a/ui/base/ime/win/tsf_event_router.h |
| +++ b/ui/base/ime/win/tsf_event_router.h |
| @@ -15,6 +15,7 @@ |
| #include "base/callback.h" |
| #include "base/compiler_specific.h" |
| #include "ui/base/ime/text_input_type.h" |
| +#include "ui/base/range/range.h" |
| #include "ui/base/ui_export.h" |
| struct ITfDocumentMgr; |
| @@ -25,12 +26,19 @@ class TsfEventRouterObserver { |
| public: |
| TsfEventRouterObserver() {} |
| - // Called when the text contents are updated. |
| - virtual void OnTextUpdated() = 0; |
| - |
| // Called when the number of currently opened candidate windows changes. |
| virtual void OnCandidateWindowCountChanged(size_t window_count) = 0; |
|
Peter Kasting
2012/10/27 22:29:50
Nit: I suggest providing default no-op implementat
Seigo Nonaka
2012/10/28 01:50:44
Sure, done.
On 2012/10/27 22:29:50, Peter Kasting
|
| + // Called when a composition is started. |
| + virtual void OnTsfStartComposition() = 0; |
| + |
| + // Called when the text contents are updated. If there is no composition, |
| + // ui::Range::InvalidRange is passed to |composition_range|. |
| + virtual void OnTextUpdated(const ui::Range& composition_range) = 0; |
| + |
| + // Called when a composition is terminated. |
| + virtual void OnTsfEndComposition() = 0; |
| + |
| protected: |
| virtual ~TsfEventRouterObserver() {} |
| @@ -46,15 +54,17 @@ class UI_EXPORT TsfEventRouter { |
| explicit TsfEventRouter(TsfEventRouterObserver* observer); |
| virtual ~TsfEventRouter(); |
| - // Sets |thread_manager| to be monitored. |thread_manager| can be NULL. |
| - void SetManager(ITfThreadMgr* thread_manager); |
| - |
| // Returns true if the IME is composing text. |
| bool IsImeComposing(); |
| // Callbacks from the TsfEventRouterDelegate: |
| - void OnTextUpdated(); |
| void OnCandidateWindowCountChanged(size_t window_count); |
| + void OnTsfStartComposition(); |
| + void OnTextUpdated(const ui::Range& composition_range); |
| + void OnTsfEndComposition(); |
| + |
| + // Sets |thread_manager| to be monitored. |thread_manager| can be NULL. |
| + void SetManager(ITfThreadMgr* thread_manager); |
| private: |
| class TsfEventRouterDelegate; |