| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ |
| 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ | 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ |
| 7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 #include <Carbon/Carbon.h> | 9 #include <Carbon/Carbon.h> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "media/base/media_export.h" |
| 13 #include "third_party/skia/include/core/SkPoint.h" | 14 #include "third_party/skia/include/core/SkPoint.h" |
| 14 #include "third_party/skia/include/core/SkRect.h" | 15 #include "third_party/skia/include/core/SkRect.h" |
| 15 | 16 |
| 16 namespace media { | 17 namespace media { |
| 17 | 18 |
| 18 // Describes the configuration of a specific display. | 19 // Describes the configuration of a specific display. |
| 19 struct MacDisplayConfiguration { | 20 struct MEDIA_EXPORT MacDisplayConfiguration { |
| 20 MacDisplayConfiguration(); | 21 MacDisplayConfiguration(); |
| 21 | 22 |
| 22 // Returns the current configuration of the specified display. | 23 // Returns the current configuration of the specified display. |
| 23 static MacDisplayConfiguration ForDisplay(CGDirectDisplayID display_id); | 24 MEDIA_EXPORT static MacDisplayConfiguration ForDisplay( |
| 25 CGDirectDisplayID display_id); |
| 24 | 26 |
| 25 // Cocoa identifier for this display. | 27 // Cocoa identifier for this display. |
| 26 CGDirectDisplayID id; | 28 CGDirectDisplayID id; |
| 27 | 29 |
| 28 // Bounds of this display in Density-Independent Pixels (DIPs). | 30 // Bounds of this display in Density-Independent Pixels (DIPs). |
| 29 SkIRect bounds; | 31 SkIRect bounds; |
| 30 | 32 |
| 31 // Bounds of this display in physical pixels. | 33 // Bounds of this display in physical pixels. |
| 32 SkIRect pixel_bounds; | 34 SkIRect pixel_bounds; |
| 33 | 35 |
| 34 // Scale factor from DIPs to physical pixels. | 36 // Scale factor from DIPs to physical pixels. |
| 35 float dip_to_pixel_scale; | 37 float dip_to_pixel_scale; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 typedef std::vector<MacDisplayConfiguration> MacDisplayConfigurations; | 40 typedef std::vector<MacDisplayConfiguration> MacDisplayConfigurations; |
| 39 | 41 |
| 40 // Describes the configuration of the whole desktop. | 42 // Describes the configuration of the whole desktop. |
| 41 struct MacDesktopConfiguration { | 43 struct MEDIA_EXPORT MacDesktopConfiguration { |
| 42 MacDesktopConfiguration(); | 44 MacDesktopConfiguration(); |
| 43 ~MacDesktopConfiguration(); | 45 ~MacDesktopConfiguration(); |
| 44 | 46 |
| 45 // Returns the current configuration of the desktop. | 47 // Returns the current configuration of the desktop. |
| 46 static MacDesktopConfiguration GetCurrent(); | 48 MEDIA_EXPORT static MacDesktopConfiguration GetCurrent(); |
| 47 | 49 |
| 48 // Bounds of the desktop in Density-Independent Pixels (DIPs). | 50 // Bounds of the desktop in Density-Independent Pixels (DIPs). |
| 49 SkIRect bounds; | 51 SkIRect bounds; |
| 50 | 52 |
| 51 // Bounds of the desktop in physical pixels. | 53 // Bounds of the desktop in physical pixels. |
| 52 SkIRect pixel_bounds; | 54 SkIRect pixel_bounds; |
| 53 | 55 |
| 54 // Scale factor from DIPs to physical pixels. | 56 // Scale factor from DIPs to physical pixels. |
| 55 float dip_to_pixel_scale; | 57 float dip_to_pixel_scale; |
| 56 | 58 |
| 57 // Configurations of the displays making up the desktop area. | 59 // Configurations of the displays making up the desktop area. |
| 58 MacDisplayConfigurations displays; | 60 MacDisplayConfigurations displays; |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace media | 63 } // namespace media |
| 62 | 64 |
| 63 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ | 65 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ |
| OLD | NEW |