Chromium Code Reviews| Index: ui/gfx/screen_win.h |
| diff --git a/ui/gfx/screen_win.h b/ui/gfx/screen_win.h |
| index b1488ae05bb850b9cfc4cfa762219b56d47ff5d0..7d18fc4e05cd358fe21f1920f75798aa57b8d125 100644 |
| --- a/ui/gfx/screen_win.h |
| +++ b/ui/gfx/screen_win.h |
| @@ -5,21 +5,33 @@ |
| #ifndef UI_GFX_SCREEN_WIN_H_ |
| #define UI_GFX_SCREEN_WIN_H_ |
| -#include "base/compiler_specific.h" |
| -#include "base/gtest_prod_util.h" |
| +#include <vector> |
| + |
| #include "base/macros.h" |
| -#include "base/memory/scoped_ptr.h" |
| #include "ui/gfx/display_change_notifier.h" |
| #include "ui/gfx/gfx_export.h" |
| +#include "ui/gfx/native_widget_types.h" |
| #include "ui/gfx/screen.h" |
| -#include "ui/gfx/win/singleton_hwnd_observer.h" |
| +#include "ui/gfx/win/display_manager_observer.h" |
| namespace gfx { |
| -class GFX_EXPORT ScreenWin : public Screen { |
| +class Display; |
| +class Point; |
| +class Rect; |
| + |
| +namespace win { |
| + |
| +class DisplayManager; |
| +class ScreenWinDisplay; |
| + |
| +} // namespace win |
| + |
| +class GFX_EXPORT ScreenWin : public Screen, |
| + public gfx::win::DisplayManagerObserver { |
| public: |
| ScreenWin(); |
| - ~ScreenWin() override; |
| + virtual ~ScreenWin() override; |
|
oshima
2016/01/28 18:32:04
nuke virtual
robliao
2016/01/29 01:44:40
Done.
|
| // Returns the HWND associated with the NativeView. |
| virtual HWND GetHWNDFromNativeView(NativeView window) const; |
| @@ -41,22 +53,17 @@ class GFX_EXPORT ScreenWin : public Screen { |
| void AddObserver(DisplayObserver* observer) override; |
| void RemoveObserver(DisplayObserver* observer) override; |
| - private: |
| - FRIEND_TEST_ALL_PREFIXES(ScreenWinTest, SingleDisplay1x); |
| - FRIEND_TEST_ALL_PREFIXES(ScreenWinTest, SingleDisplay2x); |
| - |
| - void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); |
| - |
| - static std::vector<gfx::Display> GetDisplaysForMonitorInfos( |
| - const std::vector<MONITORINFOEX>& monitor_infos); |
| + // Overridden from gfx::win::DisplayManagerObserver: |
|
oshima
2016/01/28 18:32:04
// gfx::win::DisplayManagerObserver:
robliao
2016/01/29 01:44:40
Updated the gfx::Screen: comment for consistency t
|
| + void OnDisplaysChanged( |
| + const std::vector<gfx::win::ScreenWinDisplay> old_screen_win_displays, |
| + const std::vector<gfx::win::ScreenWinDisplay> new_screen_win_displays) |
| + override; |
| + private: |
| // Helper implementing the DisplayObserver handling. |
| gfx::DisplayChangeNotifier change_notifier_; |
| - scoped_ptr<SingletonHwndObserver> singleton_hwnd_observer_; |
| - |
| - // Current list of displays. |
| - std::vector<gfx::Display> displays_; |
| + gfx::win::DisplayManager* display_manager_; |
|
oshima
2016/01/28 18:32:04
document ownership
robliao
2016/01/29 01:44:40
Done.
|
| DISALLOW_COPY_AND_ASSIGN(ScreenWin); |
| }; |