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

Side by Side Diff: remoting/capturer/mac/desktop_configuration.h

Issue 12040058: Add support for high-DPI hosts under Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indent Created 7 years, 11 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
« no previous file with comments | « no previous file | remoting/capturer/mac/desktop_configuration.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CAPTURER_MAC_DESKTOP_CONFIGURATION_H_
6 #define REMOTING_CAPTURER_MAC_DESKTOP_CONFIGURATION_H_
7
8 #include <ApplicationServices/ApplicationServices.h>
9 #include <Carbon/Carbon.h>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "third_party/skia/include/core/SkPoint.h"
14 #include "third_party/skia/include/core/SkRect.h"
15
16 namespace remoting {
17
18 // Describes the configuration of a specific display.
19 struct MacDisplayConfiguration {
20 MacDisplayConfiguration();
21
22 // Returns the current configuration of the specified display.
23 static MacDisplayConfiguration ForDisplay(CGDirectDisplayID display_id);
24
25 // Cocoa identifier for this display.
26 CGDirectDisplayID id;
27
28 // Bounds of this display in Density-Independent Pixels (DIPs).
29 SkIRect bounds;
30
31 // Bounds of this display in physical pixels.
32 SkIRect pixel_bounds;
33
34 // Scale factor from DIPs to physical pixels.
35 float dip_to_pixel_scale;
36 };
37
38 typedef std::vector<MacDisplayConfiguration> MacDisplayConfigurations;
39
40 // Describes the configuration of the whole desktop.
41 struct MacDesktopConfiguration {
42 MacDesktopConfiguration();
43 ~MacDesktopConfiguration();
44
45 // Returns the current configuration of the desktop.
46 static MacDesktopConfiguration GetCurrent();
47
48 // Bounds of the desktop in Density-Independent Pixels (DIPs).
49 SkIRect bounds;
50
51 // Bounds of the desktop in physical pixels.
52 SkIRect pixel_bounds;
53
54 // Scale factor from DIPs to physical pixels.
55 float dip_to_pixel_scale;
56
57 // Configurations of the displays making up the desktop area.
58 MacDisplayConfigurations displays;
59 };
60
61 } // namespace remoting
62
63 #endif // REMOTING_CAPTURER_MAC_DESKTOP_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/capturer/mac/desktop_configuration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698