| 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 #include "remoting/capturer/mac/desktop_configuration.h" | 5 #include "media/video/capture/screen/mac/desktop_configuration.h" |
| 6 | 6 |
| 7 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "skia/ext/skia_utils_mac.h" | 10 #include "skia/ext/skia_utils_mac.h" |
| 11 | 11 |
| 12 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 12 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
| 13 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 13 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
| 14 | 14 |
| 15 @interface NSScreen (LionAPI) | 15 @interface NSScreen (LionAPI) |
| 16 - (CGFloat)backingScaleFactor; | 16 - (CGFloat)backingScaleFactor; |
| 17 - (NSRect)convertRectToBacking:(NSRect)aRect; | 17 - (NSRect)convertRectToBacking:(NSRect)aRect; |
| 18 @end | 18 @end |
| 19 | 19 |
| 20 #endif // 10.7 | 20 #endif // 10.7 |
| 21 | 21 |
| 22 namespace remoting { | 22 namespace media { |
| 23 | 23 |
| 24 MacDisplayConfiguration::MacDisplayConfiguration() | 24 MacDisplayConfiguration::MacDisplayConfiguration() |
| 25 : id(0), | 25 : id(0), |
| 26 bounds(SkIRect::MakeEmpty()), | 26 bounds(SkIRect::MakeEmpty()), |
| 27 pixel_bounds(SkIRect::MakeEmpty()), | 27 pixel_bounds(SkIRect::MakeEmpty()), |
| 28 dip_to_pixel_scale(1.0f) { | 28 dip_to_pixel_scale(1.0f) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 static SkIRect NSRectToSkIRect(const NSRect& ns_rect) { | 31 static SkIRect NSRectToSkIRect(const NSRect& ns_rect) { |
| 32 SkIRect result; | 32 SkIRect result; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 desktop_config.displays.push_back(display_config); | 96 desktop_config.displays.push_back(display_config); |
| 97 | 97 |
| 98 // Update the desktop bounds to account for this display. | 98 // Update the desktop bounds to account for this display. |
| 99 desktop_config.bounds.join(display_config.bounds); | 99 desktop_config.bounds.join(display_config.bounds); |
| 100 desktop_config.pixel_bounds.join(display_config.pixel_bounds); | 100 desktop_config.pixel_bounds.join(display_config.pixel_bounds); |
| 101 } | 101 } |
| 102 | 102 |
| 103 return desktop_config; | 103 return desktop_config; |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace remoting | 106 } // namespace media |
| OLD | NEW |