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..c81bbe857325542d0419a6372512e66e338ca62d 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 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 the number of currently opened candidate windows changes. |
| virtual void OnCandidateWindowCountChanged(size_t window_count) = 0; |
| + // Called when a composition is started. |
|
Peter Kasting
2012/10/27 19:00:46
Nit: I suggest ordering these (here and everywhere
Seigo Nonaka
2012/10/27 22:20:18
Sure, done.
|
| + virtual void OnTsfStartComposition() = 0; |
| + |
| + // Called when a composition is terminated. |
| + virtual void OnTsfEndComposition() = 0; |
| + |
| protected: |
| virtual ~TsfEventRouterObserver() {} |
| @@ -53,8 +61,10 @@ class UI_EXPORT TsfEventRouter { |
| bool IsImeComposing(); |
| // Callbacks from the TsfEventRouterDelegate: |
| - void OnTextUpdated(); |
| + void OnTextUpdated(const ui::Range& composition_range); |
| void OnCandidateWindowCountChanged(size_t window_count); |
| + void OnTsfStartComposition(); |
| + void OnTsfEndComposition(); |
| private: |
| class TsfEventRouterDelegate; |