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

Side by Side Diff: media/video/capture/screen/mac/desktop_configuration.h

Issue 13983010: Use webrtc::DesktopCapturer for screen capturer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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 "media/base/media_export.h"
14 #include "third_party/skia/include/core/SkPoint.h" 14 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
15 #include "third_party/skia/include/core/SkRect.h"
16 15
17 namespace media { 16 namespace media {
18 17
19 // Describes the configuration of a specific display. 18 // Describes the configuration of a specific display.
20 struct MEDIA_EXPORT MacDisplayConfiguration { 19 struct MEDIA_EXPORT MacDisplayConfiguration {
21 MacDisplayConfiguration(); 20 MacDisplayConfiguration();
22 21
23 // Cocoa identifier for this display. 22 // Cocoa identifier for this display.
24 CGDirectDisplayID id; 23 CGDirectDisplayID id;
25 24
26 // Bounds of this display in Density-Independent Pixels (DIPs). 25 // Bounds of this display in Density-Independent Pixels (DIPs).
27 SkIRect bounds; 26 webrtc::DesktopRect bounds;
28 27
29 // Bounds of this display in physical pixels. 28 // Bounds of this display in physical pixels.
30 SkIRect pixel_bounds; 29 webrtc::DesktopRect pixel_bounds;
31 30
32 // Scale factor from DIPs to physical pixels. 31 // Scale factor from DIPs to physical pixels.
33 float dip_to_pixel_scale; 32 float dip_to_pixel_scale;
34 }; 33 };
35 34
36 typedef std::vector<MacDisplayConfiguration> MacDisplayConfigurations; 35 typedef std::vector<MacDisplayConfiguration> MacDisplayConfigurations;
37 36
38 // Describes the configuration of the whole desktop. 37 // Describes the configuration of the whole desktop.
39 struct MEDIA_EXPORT MacDesktopConfiguration { 38 struct MEDIA_EXPORT MacDesktopConfiguration {
40 // Used to request bottom-up or top-down coordinates. 39 // Used to request bottom-up or top-down coordinates.
41 enum Origin { BottomLeftOrigin, TopLeftOrigin }; 40 enum Origin { BottomLeftOrigin, TopLeftOrigin };
42 41
43 MacDesktopConfiguration(); 42 MacDesktopConfiguration();
44 ~MacDesktopConfiguration(); 43 ~MacDesktopConfiguration();
45 44
46 // Returns the desktop & display configurations in Cocoa-style "bottom-up" 45 // Returns the desktop & display configurations in Cocoa-style "bottom-up"
47 // (the origin is the bottom-left of the primary monitor, and coordinates 46 // (the origin is the bottom-left of the primary monitor, and coordinates
48 // increase as you move up the screen) or Carbon-style "top-down" coordinates. 47 // increase as you move up the screen) or Carbon-style "top-down" coordinates.
49 MEDIA_EXPORT static MacDesktopConfiguration GetCurrent(Origin origin); 48 MEDIA_EXPORT static MacDesktopConfiguration GetCurrent(Origin origin);
50 49
51 // Bounds of the desktop in Density-Independent Pixels (DIPs). 50 // Bounds of the desktop in Density-Independent Pixels (DIPs).
52 SkIRect bounds; 51 webrtc::DesktopRect bounds;
53 52
54 // Bounds of the desktop in physical pixels. 53 // Bounds of the desktop in physical pixels.
55 SkIRect pixel_bounds; 54 webrtc::DesktopRect pixel_bounds;
56 55
57 // Scale factor from DIPs to physical pixels. 56 // Scale factor from DIPs to physical pixels.
58 float dip_to_pixel_scale; 57 float dip_to_pixel_scale;
59 58
60 // Configurations of the displays making up the desktop area. 59 // Configurations of the displays making up the desktop area.
61 MacDisplayConfigurations displays; 60 MacDisplayConfigurations displays;
62 }; 61 };
63 62
64 } // namespace media 63 } // namespace media
65 64
66 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_ 65 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_MAC_DESKTOP_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « media/video/capture/screen/differ_unittest.cc ('k') | media/video/capture/screen/mac/desktop_configuration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698