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

Side by Side Diff: remoting/host/capturer_fake.h

Issue 4971003: Inject MessageLoop into Capturer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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) 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_H_ 5 #ifndef REMOTING_HOST_CAPTURER_FAKE_H_
6 #define REMOTING_HOST_CAPTURER_FAKE_H_ 6 #define REMOTING_HOST_CAPTURER_FAKE_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 CapturerFake generates artificial image for testing purpose. 13 // A CapturerFake generates artificial image for testing purpose.
14 // 14 //
15 // CapturerFake is doubled buffered as required by Capturer. See 15 // CapturerFake is doubled buffered as required by Capturer. See
16 // remoting/host/capturer.h. 16 // remoting/host/capturer.h.
17 class CapturerFake : public Capturer { 17 class CapturerFake : public Capturer {
18 public: 18 public:
19 CapturerFake(); 19 CapturerFake(MessageLoop* message_loop);
awong 2010/11/16 00:42:12 explicit
20 virtual ~CapturerFake(); 20 virtual ~CapturerFake();
21 21
22 virtual void ScreenConfigurationChanged(); 22 virtual void ScreenConfigurationChanged();
23 23
24 private: 24 private:
25 virtual void CalculateInvalidRects(); 25 virtual void CalculateInvalidRects();
26 virtual void CaptureRects(const InvalidRects& rects, 26 virtual void CaptureRects(const InvalidRects& rects,
27 CaptureCompletedCallback* callback); 27 CaptureCompletedCallback* callback);
28 28
29 // Generates an image in the front buffer. 29 // Generates an image in the front buffer.
30 void GenerateImage(); 30 void GenerateImage();
31 31
32 int box_pos_x_; 32 int box_pos_x_;
33 int box_pos_y_; 33 int box_pos_y_;
34 int box_speed_x_; 34 int box_speed_x_;
35 int box_speed_y_; 35 int box_speed_y_;
36 36
37 // We have two buffers for the screen images as required by Capturer. 37 // We have two buffers for the screen images as required by Capturer.
38 scoped_array<uint8> buffers_[kNumBuffers]; 38 scoped_array<uint8> buffers_[kNumBuffers];
39 39
40 DISALLOW_COPY_AND_ASSIGN(CapturerFake); 40 DISALLOW_COPY_AND_ASSIGN(CapturerFake);
41 }; 41 };
42 42
43 } // namespace remoting 43 } // namespace remoting
44 44
45 #endif // REMOTING_HOST_CAPTURER_FAKE_H_ 45 #endif // REMOTING_HOST_CAPTURER_FAKE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698