OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ | 5 #ifndef REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ |
6 #define REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ | 6 #define REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "remoting/host/capturer.h" | 9 #include "remoting/host/capturer.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 // A CapturerFakeAscii always outputs an image of 64x48 ASCII characters. | 13 // A CapturerFakeAscii always outputs an image of 64x48 ASCII characters. |
14 // This image is artificially generated for testing purpose. | 14 // This image is artificially generated for testing purpose. |
15 // | 15 // |
16 // CapturerFakeAscii is doubled buffered as required by Capturer. See | 16 // CapturerFakeAscii is doubled buffered as required by Capturer. See |
17 // remoting/host/capturer.h. | 17 // remoting/host/capturer.h. |
18 class CapturerFakeAscii : public Capturer { | 18 class CapturerFakeAscii : public Capturer { |
19 public: | 19 public: |
20 CapturerFakeAscii(); | 20 CapturerFakeAscii(MessageLoop* message_loop); |
awong
2010/11/16 00:42:12
explicit
| |
21 virtual ~CapturerFakeAscii(); | 21 virtual ~CapturerFakeAscii(); |
22 | 22 |
23 virtual void ScreenConfigurationChanged(); | 23 virtual void ScreenConfigurationChanged(); |
24 | 24 |
25 private: | 25 private: |
26 virtual void CalculateInvalidRects(); | 26 virtual void CalculateInvalidRects(); |
27 virtual void CaptureRects(const InvalidRects& rects, | 27 virtual void CaptureRects(const InvalidRects& rects, |
28 CaptureCompletedCallback* callback); | 28 CaptureCompletedCallback* callback); |
29 | 29 |
30 // Generates an image in the front buffer. | 30 // Generates an image in the front buffer. |
31 void GenerateImage(); | 31 void GenerateImage(); |
32 | 32 |
33 // We have two buffers for the screen images as required by Capturer. | 33 // We have two buffers for the screen images as required by Capturer. |
34 scoped_array<uint8> buffers_[kNumBuffers]; | 34 scoped_array<uint8> buffers_[kNumBuffers]; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(CapturerFakeAscii); | 36 DISALLOW_COPY_AND_ASSIGN(CapturerFakeAscii); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace remoting | 39 } // namespace remoting |
40 | 40 |
41 #endif // REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ | 41 #endif // REMOTING_HOST_CAPTURER_FAKE_ASCII_H_ |
OLD | NEW |