Chromium Code Reviews| Index: ui/gfx/win/display_info.h |
| diff --git a/ui/gfx/win/display_info.h b/ui/gfx/win/display_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d5e4721488076972d8c7e2210354e9182ca25177 |
| --- /dev/null |
| +++ b/ui/gfx/win/display_info.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_GFX_WIN_DISPLAY_INFO_H_ |
| +#define UI_GFX_WIN_DISPLAY_INFO_H_ |
| + |
| +#include <windows.h> |
| +#include <stdint.h> |
| + |
| +#include "ui/gfx/display.h" |
| +#include "ui/gfx/gfx_export.h" |
| + |
| +namespace gfx { |
| +namespace win { |
| + |
| +// Gathers the parameters necessary to create a gfx::win::ScreenWinDisplay. |
| +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.
|
| + public: |
| + 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.
|
| + |
| + DisplayInfo(const MONITORINFOEX& monitor_info, float device_scale_factor); |
| + DisplayInfo(const MONITORINFOEX& monitor_info, |
| + float device_scale_factor, |
| + gfx::Display::Rotation rotation); |
| + |
| + int64_t id() const { return id_; } |
| + gfx::Display::Rotation rotation() const { return rotation_; } |
| + const gfx::Rect& screen_rect() const { return screen_rect_; } |
| + const gfx::Rect& screen_work_rect() const { return screen_work_rect_; } |
| + float device_scale_factor() const { return device_scale_factor_; } |
| + |
| + private: |
| + const int64_t id_; |
| + const gfx::Display::Rotation rotation_; |
| + const gfx::Rect screen_rect_; |
| + const gfx::Rect screen_work_rect_; |
| + const float device_scale_factor_; |
| +}; |
| + |
| +} // namespace win |
| +} // namespace gfx |
| + |
| +#endif // UI_GFX_WIN_DISPLAY_INFO_H_ |