| OLD | NEW |
| (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_ | |
| OLD | NEW |