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 2691c71fbde3419c737ffaf330675ccc005ca94b..9f4419f1add9a8ab7df7ddd411d2450247ac80ad 100644 |
--- a/ui/base/ime/win/tsf_event_router.h |
+++ b/ui/base/ime/win/tsf_event_router.h |
@@ -23,28 +23,27 @@ namespace ui { |
// class anyway, this interface is derived from IUnknown. |
class TsfEventRouter : public IUnknown { |
public: |
- typedef base::Callback<void ()> TextUpdatedCallback; |
- typedef base::Callback<void (size_t window_count)> |
- CandidateWindowCountChangedCallback; |
+ class Observer { |
+ public: |
+ virtual ~Observer() {} |
+ |
+ // Called when the text contents are updated. |
+ virtual void OnTextUpdated() = 0; |
+ |
+ // Called when the number of currently opend candidate windowsd is changed. |
Peter Kasting
2012/10/19 18:40:57
Nit: opend -> open, windowsd -> windows, is change
Seigo Nonaka
2012/10/22 03:11:04
Done.
|
+ virtual void OnCandidateWindowCountChanged(size_t window_count) = 0; |
+ }; |
virtual ~TsfEventRouter(); |
- // Sets |manager| to be monitored. |manager| can be NULL. |
- virtual void SetManager(ITfThreadMgr* manager) = 0; |
+ // Sets |manager| to be monitored and |observer| to be notified. |manager| and |
+ // |observer| can be NULL. |
+ virtual void SetManager(ITfThreadMgr* manager, |
+ Observer* observer) = 0; |
// Returns true if the IME is composing texts. |
virtual bool IsImeComposing() = 0; |
- // Sets the callback function which is invoked when the text contents is |
- // updated. |
- virtual void SetTextUpdatedCallback( |
- const TextUpdatedCallback& callback) = 0; |
- |
- // Sets the callback function which is invoked when the number of currently |
- // candidate window opened is changed. |
- virtual void SetCandidateWindowStatusChangedCallback( |
- const CandidateWindowCountChangedCallback& callback) = 0; |
- |
// Factory function, creates a new instance and retunrns ownership. |
Peter Kasting
2012/10/19 18:40:57
Nit: While here: and retunrns ownership -> which t
Seigo Nonaka
2012/10/22 03:11:04
Done.
|
static UI_EXPORT TsfEventRouter* Create(); |