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

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

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