| 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 #include "ui/gfx/win/singleton_hwnd.h" | 5 #include "ui/gfx/win/singleton_hwnd.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "ui/gfx/win/singleton_hwnd_observer.h" | 9 #include "ui/gfx/win/singleton_hwnd_observer.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 SingletonHwnd* SingletonHwnd::GetInstance() { | 14 SingletonHwnd* SingletonHwnd::GetInstance() { |
| 15 return Singleton<SingletonHwnd>::get(); | 15 return base::Singleton<SingletonHwnd>::get(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 BOOL SingletonHwnd::ProcessWindowMessage(HWND window, | 18 BOOL SingletonHwnd::ProcessWindowMessage(HWND window, |
| 19 UINT message, | 19 UINT message, |
| 20 WPARAM wparam, | 20 WPARAM wparam, |
| 21 LPARAM lparam, | 21 LPARAM lparam, |
| 22 LRESULT& result, | 22 LRESULT& result, |
| 23 DWORD msg_map_id) { | 23 DWORD msg_map_id) { |
| 24 FOR_EACH_OBSERVER(SingletonHwndObserver, | 24 FOR_EACH_OBSERVER(SingletonHwndObserver, |
| 25 observer_list_, | 25 observer_list_, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 48 | 48 |
| 49 void SingletonHwnd::AddObserver(SingletonHwndObserver* observer) { | 49 void SingletonHwnd::AddObserver(SingletonHwndObserver* observer) { |
| 50 observer_list_.AddObserver(observer); | 50 observer_list_.AddObserver(observer); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void SingletonHwnd::RemoveObserver(SingletonHwndObserver* observer) { | 53 void SingletonHwnd::RemoveObserver(SingletonHwndObserver* observer) { |
| 54 observer_list_.RemoveObserver(observer); | 54 observer_list_.RemoveObserver(observer); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace gfx | 57 } // namespace gfx |
| OLD | NEW |