| Index: ui/display/win/screen_win.h
|
| diff --git a/ui/display/win/screen_win.h b/ui/display/win/screen_win.h
|
| index eed87d9e45f4ef86d7d03452821cd422dea02301..d6a3497177b61e308f0dabfa3e547dd369d5e75e 100644
|
| --- a/ui/display/win/screen_win.h
|
| +++ b/ui/display/win/screen_win.h
|
| @@ -14,6 +14,7 @@
|
| #include "ui/display/display_change_notifier.h"
|
| #include "ui/display/display_export.h"
|
| #include "ui/display/screen.h"
|
| +#include "ui/display/win/color_profile_reader.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| #include "ui/gfx/win/singleton_hwnd_observer.h"
|
|
|
| @@ -30,7 +31,8 @@ namespace win {
|
| class DisplayInfo;
|
| class ScreenWinDisplay;
|
|
|
| -class DISPLAY_EXPORT ScreenWin : public Screen {
|
| +class DISPLAY_EXPORT ScreenWin : public Screen,
|
| + public ColorProfileReader::Client {
|
| public:
|
| ScreenWin();
|
| ~ScreenWin() override;
|
| @@ -116,6 +118,8 @@ class DISPLAY_EXPORT ScreenWin : public Screen {
|
| virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const;
|
|
|
| protected:
|
| + ScreenWin(bool initialize);
|
| +
|
| // Screen:
|
| gfx::Point GetCursorScreenPoint() override;
|
| bool IsWindowUnderCursor(gfx::NativeWindow window) override;
|
| @@ -133,10 +137,12 @@ class DISPLAY_EXPORT ScreenWin : public Screen {
|
| gfx::Rect DIPToScreenRectInWindow(
|
| gfx::NativeView view, const gfx::Rect& dip_rect) const override;
|
|
|
| + // ColorProfileReader::Client:
|
| + void OnColorProfilesChanged() override;
|
| +
|
| void UpdateFromDisplayInfos(const std::vector<DisplayInfo>& display_infos);
|
|
|
| // Virtual to support mocking by unit tests.
|
| - virtual void Initialize();
|
| virtual MONITORINFOEX MonitorInfoFromScreenPoint(
|
| const gfx::Point& screen_point) const;
|
| virtual MONITORINFOEX MonitorInfoFromScreenRect(const gfx::Rect& screen_rect)
|
| @@ -147,6 +153,7 @@ class DISPLAY_EXPORT ScreenWin : public Screen {
|
| virtual int GetSystemMetrics(int metric) const;
|
|
|
| private:
|
| + void Initialize();
|
| void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
|
|
|
| // Returns the ScreenWinDisplay closest to or enclosing |hwnd|.
|
| @@ -193,6 +200,9 @@ class DISPLAY_EXPORT ScreenWin : public Screen {
|
| // This must be updated anytime |screen_win_displays_| is updated.
|
| std::vector<Display> displays_;
|
|
|
| + // A helper to read color profiles from the filesystem.
|
| + std::unique_ptr<ColorProfileReader> color_profile_reader_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScreenWin);
|
| };
|
|
|
|
|