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

Side by Side Diff: remoting/host/screen_resolution.h

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 REMOTING_HOST_SCREEN_RESOLUTION_H_
6 #define REMOTING_HOST_SCREEN_RESOLUTION_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "third_party/skia/include/core/SkPoint.h"
11 #include "third_party/skia/include/core/SkSize.h"
12
13 namespace remoting {
14
15 // This structure describes the screen's dimensions and DPI.
16 struct ScreenResolution {
17 ScreenResolution();
18
19 // Initializes |this| assuming the efault DPI.
20 explicit ScreenResolution(const SkISize& dimensions);
21
22 // Returns the default DPI of (96, 96) if |dpi_| is (0, 0). Returns |dpi_|
23 // otherwise.
24 SkIPoint GetEffectiveDpi() const;
25
26 // Returns the screen dimensions in logical pixels. I.e. returns
27 // the dimensions of a screen of the same size displaying 96 pixels per inch.
28 SkISize GetLogicalDimensions() const;
29
30 // Returns true if either the screen size is empty or IsValid() returns false.
31 bool IsNull() const;
32
33 // Returns true if both |dimensions_| and |dpi_| are non-negative.
34 bool IsValid() const;
Jamie 2013/03/15 18:33:24 I think it's worth doing a careful audit (perhaps
alexeypa (please no reviews) 2013/03/15 20:30:41 We need both. We need to be able to check if the s
Jamie 2013/03/15 22:06:27 Fair enough; thanks for the clarification. However
alexeypa (please no reviews) 2013/03/15 22:32:12 Done.
35
36 // Dimensions of the screen in pixels.
37 SkISize dimensions_;
38
39 // The vertical and horizontal DPI of the screen.
40 SkIPoint dpi_;
41 };
42
43 } // namespace remoting
44
45 #endif // REMOTING_HOST_SCREEN_RESOLUTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698