Chromium Code Reviews| Index: ui/gfx/win/screen_win_display.h |
| diff --git a/ui/gfx/win/screen_win_display.h b/ui/gfx/win/screen_win_display.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..01def8be38a51a4f1d73bc175bada1e05a3a81ea |
| --- /dev/null |
| +++ b/ui/gfx/win/screen_win_display.h |
| @@ -0,0 +1,36 @@ |
| +// 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_SCREEN_WIN_DISPLAY_H_ |
| +#define UI_GFX_WIN_SCREEN_WIN_DISPLAY_H_ |
| + |
| +#include <windows.h> |
| + |
| +#include "ui/gfx/display.h" |
| +#include "ui/gfx/geometry/rect.h" |
| + |
| +namespace gfx { |
| +namespace win { |
| + |
| +class DisplayInfo; |
| + |
| +// A display used by gfx::ScreenWin. |
| +// It holds a display and additional parameters used for DPI calculations. |
| +class ScreenWinDisplay final { |
|
sky
2016/02/03 21:47:38
Did you consider making this a struct and the two
robliao
2016/02/03 22:47:20
I did and erred on the side of keeping this a clas
robliao
2016/02/04 01:11:30
I also forgot that I got bitten by this:
http://st
robliao
2016/02/04 01:42:52
And fixed.
|
| + public: |
| + ScreenWinDisplay(); |
| + explicit ScreenWinDisplay(const DisplayInfo& display_info); |
| + |
| + const Display& display() const { return display_; } |
| + const Rect& physical_bounds() const { return pixel_bounds_; }; |
| + |
| + private: |
| + const gfx::Display display_; |
| + const gfx::Rect pixel_bounds_; |
| +}; |
| + |
| +} // namespace win |
| +} // namespace gfx |
| + |
| +#endif // UI_GFX_WIN_SCREEN_WIN_DISPLAY_H_ |