diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/focus/focus_manager.cc | 8 | ||||
-rw-r--r-- | views/focus/focus_manager.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc index 4848e4b..e8a3e7e 100644 --- a/views/focus/focus_manager.cc +++ b/views/focus/focus_manager.cc @@ -63,6 +63,12 @@ void FocusManager::WidgetFocusManager::OnWidgetFocusEvent( } } +// static +FocusManager::WidgetFocusManager* +FocusManager::WidgetFocusManager::GetInstance() { + return Singleton<WidgetFocusManager>::get(); +} + // FocusManager ----------------------------------------------------- FocusManager::FocusManager(Widget* widget) @@ -82,7 +88,7 @@ FocusManager::~FocusManager() { // static FocusManager::WidgetFocusManager* FocusManager::GetWidgetFocusManager() { - return Singleton<WidgetFocusManager>::get(); + return WidgetFocusManager::GetInstance(); } bool FocusManager::OnKeyEvent(const KeyEvent& event) { diff --git a/views/focus/focus_manager.h b/views/focus/focus_manager.h index 28f97b4..6eee79d 100644 --- a/views/focus/focus_manager.h +++ b/views/focus/focus_manager.h @@ -126,6 +126,9 @@ class FocusManager { public: class WidgetFocusManager { public: + // Returns the singleton instance. + static WidgetFocusManager* GetInstance(); + // Adds/removes a WidgetFocusChangeListener |listener| to the set of // active listeners. void AddFocusChangeListener(WidgetFocusChangeListener* listener); |