Index: ui/gfx/screen_win.h |
diff --git a/ui/gfx/screen_win.h b/ui/gfx/screen_win.h |
index b1488ae05bb850b9cfc4cfa762219b56d47ff5d0..30ac230c0056291f851bee0392afa9038cbf6809 100644 |
--- a/ui/gfx/screen_win.h |
+++ b/ui/gfx/screen_win.h |
@@ -5,18 +5,30 @@ |
#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; |
@@ -28,7 +40,7 @@ class GFX_EXPORT ScreenWin : public Screen { |
virtual NativeWindow GetNativeWindowFromHWND(HWND hwnd) const; |
protected: |
- // Overridden from gfx::Screen: |
+ // gfx::Screen: |
gfx::Point GetCursorScreenPoint() override; |
gfx::NativeWindow GetWindowUnderCursor() override; |
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; |
@@ -41,23 +53,16 @@ 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); |
+ // gfx::win::DisplayManagerObserver: |
+ 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_; |
- |
DISALLOW_COPY_AND_ASSIGN(ScreenWin); |
}; |