Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: ui/display/win/screen_win.h

Issue 2959423003: color: Read all displays' color profiles on Windows (Closed)
Patch Set: Remove unused Initialize method Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/win/color_profile_reader.cc ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ui/display/win/color_profile_reader.cc ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698