| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Since data can be read while another capture action is happening. | 41 // Since data can be read while another capture action is happening. |
| 42 class ScreenCapturer : public DesktopCapturer { | 42 class ScreenCapturer : public DesktopCapturer { |
| 43 public: | 43 public: |
| 44 // Use a struct to represent a screen although it has only an id for now, | 44 // Use a struct to represent a screen although it has only an id for now, |
| 45 // because we may want to add more fields (e.g. description) in the future. | 45 // because we may want to add more fields (e.g. description) in the future. |
| 46 struct Screen { | 46 struct Screen { |
| 47 ScreenId id; | 47 ScreenId id; |
| 48 }; | 48 }; |
| 49 typedef std::vector<Screen> ScreenList; | 49 typedef std::vector<Screen> ScreenList; |
| 50 | 50 |
| 51 // TODO(sergeyu): Remove this class once all dependencies are removed from | |
| 52 // chromium. | |
| 53 class MouseShapeObserver { | |
| 54 }; | |
| 55 | |
| 56 virtual ~ScreenCapturer() {} | 51 virtual ~ScreenCapturer() {} |
| 57 | 52 |
| 58 // Creates platform-specific capturer. | 53 // Creates a platform-specific capturer. |
| 59 // | |
| 60 // TODO(sergeyu): Remove all Create() methods except the first one. | |
| 61 // crbug.com/172183 | |
| 62 static ScreenCapturer* Create(const DesktopCaptureOptions& options); | 54 static ScreenCapturer* Create(const DesktopCaptureOptions& options); |
| 63 static ScreenCapturer* Create(); | |
| 64 | |
| 65 #if defined(WEBRTC_LINUX) | |
| 66 // Creates platform-specific capturer and instructs it whether it should use | |
| 67 // X DAMAGE support. | |
| 68 static ScreenCapturer* CreateWithXDamage(bool use_x_damage); | |
| 69 #elif defined(WEBRTC_WIN) | |
| 70 // Creates Windows-specific capturer and instructs it whether or not to | |
| 71 // disable desktop compositing. | |
| 72 static ScreenCapturer* CreateWithDisableAero(bool disable_aero); | |
| 73 #endif // defined(WEBRTC_WIN) | |
| 74 | |
| 75 // TODO(sergeyu): Remove this method once all dependencies are removed from | |
| 76 // chromium. | |
| 77 virtual void SetMouseShapeObserver( | |
| 78 MouseShapeObserver* mouse_shape_observer) {}; | |
| 79 | 55 |
| 80 // Get the list of screens (not containing kFullDesktopScreenId). Returns | 56 // Get the list of screens (not containing kFullDesktopScreenId). Returns |
| 81 // false in case of a failure. | 57 // false in case of a failure. |
| 82 virtual bool GetScreenList(ScreenList* screens) = 0; | 58 virtual bool GetScreenList(ScreenList* screens) = 0; |
| 83 | 59 |
| 84 // Select the screen to be captured. Returns false in case of a failure (e.g. | 60 // Select the screen to be captured. Returns false in case of a failure (e.g. |
| 85 // if there is no screen with the specified id). If this is never called, the | 61 // if there is no screen with the specified id). If this is never called, the |
| 86 // full desktop is captured. | 62 // full desktop is captured. |
| 87 virtual bool SelectScreen(ScreenId id) = 0; | 63 virtual bool SelectScreen(ScreenId id) = 0; |
| 88 }; | 64 }; |
| 89 | 65 |
| 90 } // namespace webrtc | 66 } // namespace webrtc |
| 91 | 67 |
| 92 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_H_ | 68 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_H_ |
| OLD | NEW |