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

Side by Side Diff: ui/gfx/win/display_info.h

Issue 1639623003: ScreenWin Testability and Restructuring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_GFX_WIN_DISPLAY_INFO_H_
6 #define UI_GFX_WIN_DISPLAY_INFO_H_
7
8 #include <windows.h>
9 #include <stdint.h>
10
11 #include "ui/gfx/display.h"
12 #include "ui/gfx/gfx_export.h"
13
14 namespace gfx {
15 namespace win {
16
17 // Gathers the parameters necessary to create a gfx::win::ScreenWinDisplay.
18 class GFX_EXPORT DisplayInfo final {
sky 2016/02/03 21:47:38 Similar comment about making this a struct.
robliao 2016/02/03 22:47:20 This can be a struct. Changed.
19 public:
20 static int64_t HashDeviceName(const wchar_t* device_name);
sky 2016/02/03 21:47:38 constructor/destructor before other functions. Als
robliao 2016/02/03 22:47:20 Done and done.
21
22 DisplayInfo(const MONITORINFOEX& monitor_info, float device_scale_factor);
23 DisplayInfo(const MONITORINFOEX& monitor_info,
24 float device_scale_factor,
25 gfx::Display::Rotation rotation);
26
27 int64_t id() const { return id_; }
28 gfx::Display::Rotation rotation() const { return rotation_; }
29 const gfx::Rect& screen_rect() const { return screen_rect_; }
30 const gfx::Rect& screen_work_rect() const { return screen_work_rect_; }
31 float device_scale_factor() const { return device_scale_factor_; }
32
33 private:
34 const int64_t id_;
35 const gfx::Display::Rotation rotation_;
36 const gfx::Rect screen_rect_;
37 const gfx::Rect screen_work_rect_;
38 const float device_scale_factor_;
39 };
40
41 } // namespace win
42 } // namespace gfx
43
44 #endif // UI_GFX_WIN_DISPLAY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698