OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SCREEN_CAPTURER_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_H_ |
6 #define MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_H_ | 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 virtual ~ScreenCapturer() {} | 80 virtual ~ScreenCapturer() {} |
81 | 81 |
82 // Creates platform-specific capturer. | 82 // Creates platform-specific capturer. |
83 static scoped_ptr<ScreenCapturer> Create(); | 83 static scoped_ptr<ScreenCapturer> Create(); |
84 | 84 |
85 #if defined(OS_LINUX) | 85 #if defined(OS_LINUX) |
86 // Creates platform-specific capturer and instructs it whether it should use | 86 // Creates platform-specific capturer and instructs it whether it should use |
87 // X DAMAGE support. | 87 // X DAMAGE support. |
88 static scoped_ptr<ScreenCapturer> CreateWithXDamage(bool use_x_damage); | 88 static scoped_ptr<ScreenCapturer> CreateWithXDamage(bool use_x_damage); |
89 #endif // defined(OS_LINUX) | 89 #elif defined(OS_WIN) |
| 90 // Creates Windows-specific capturer and instructs it whether or not to |
| 91 // disable desktop compositing. |
| 92 static scoped_ptr<ScreenCapturer> CreateWithDisableAero(bool disable_aero); |
| 93 #endif |
90 | 94 |
91 // Called at the beginning of a capturing session. |delegate| must remain | 95 // Called at the beginning of a capturing session. |delegate| must remain |
92 // valid until Stop() is called. | 96 // valid until Stop() is called. |
93 virtual void Start(Delegate* delegate) = 0; | 97 virtual void Start(Delegate* delegate) = 0; |
94 | 98 |
95 // Called at the end of a capturing session. | 99 // Called at the end of a capturing session. |
96 virtual void Stop() = 0; | 100 virtual void Stop() = 0; |
97 | 101 |
98 // Invalidates the specified region. | 102 // Invalidates the specified region. |
99 virtual void InvalidateRegion(const SkRegion& invalid_region) = 0; | 103 virtual void InvalidateRegion(const SkRegion& invalid_region) = 0; |
100 | 104 |
101 // Captures the screen data associated with each of the accumulated | 105 // Captures the screen data associated with each of the accumulated |
102 // dirty region. When the capture is complete, the delegate is notified even | 106 // dirty region. When the capture is complete, the delegate is notified even |
103 // if the dirty region is empty. | 107 // if the dirty region is empty. |
104 // | 108 // |
105 // It is OK to call this method while another thread is reading | 109 // It is OK to call this method while another thread is reading |
106 // data of the previous capture. There can be at most one concurrent read | 110 // data of the previous capture. There can be at most one concurrent read |
107 // going on when this method is called. | 111 // going on when this method is called. |
108 virtual void CaptureFrame() = 0; | 112 virtual void CaptureFrame() = 0; |
109 }; | 113 }; |
110 | 114 |
111 } // namespace media | 115 } // namespace media |
112 | 116 |
113 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_H_ | 117 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_H_ |
OLD | NEW |