| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_TEST_VIDEO_RENDERER_H_ | 5 #ifndef REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 
| 6 #define REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 6 #define REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 
| 7 | 7 | 
| 8 #include "base/macros.h" | 8 #include "base/macros.h" | 
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" | 
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" | 
| 11 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" | 
| 12 #include "remoting/client/video_renderer.h" |  | 
| 13 #include "remoting/protocol/session_config.h" | 12 #include "remoting/protocol/session_config.h" | 
|  | 13 #include "remoting/protocol/video_renderer.h" | 
| 14 #include "remoting/protocol/video_stub.h" | 14 #include "remoting/protocol/video_stub.h" | 
| 15 | 15 | 
| 16 namespace base { | 16 namespace base { | 
| 17 class Thread; | 17 class Thread; | 
| 18 class SingleThreadTaskRunner; | 18 class SingleThreadTaskRunner; | 
| 19 } | 19 } | 
| 20 | 20 | 
| 21 namespace webrtc { | 21 namespace webrtc { | 
| 22 class DesktopFrame; | 22 class DesktopFrame; | 
| 23 class DesktopRect; | 23 class DesktopRect; | 
| 24 } | 24 } | 
| 25 | 25 | 
| 26 namespace remoting { | 26 namespace remoting { | 
| 27 namespace test { | 27 namespace test { | 
| 28 | 28 | 
| 29 struct RGBValue; | 29 struct RGBValue; | 
| 30 | 30 | 
| 31 // Processes video packets as they are received from the remote host. Must be | 31 // Processes video packets as they are received from the remote host. Must be | 
| 32 // used from a thread running a message loop and this class will use that | 32 // used from a thread running a message loop and this class will use that | 
| 33 // message loop to execute the done callbacks passed by the caller of | 33 // message loop to execute the done callbacks passed by the caller of | 
| 34 // ProcessVideoPacket. | 34 // ProcessVideoPacket. | 
| 35 class TestVideoRenderer : public VideoRenderer, public protocol::VideoStub { | 35 class TestVideoRenderer : public protocol::VideoRenderer, | 
|  | 36                           public protocol::VideoStub { | 
| 36  public: | 37  public: | 
| 37   TestVideoRenderer(); | 38   TestVideoRenderer(); | 
| 38   ~TestVideoRenderer() override; | 39   ~TestVideoRenderer() override; | 
| 39 | 40 | 
| 40   // VideoRenderer interface. | 41   // VideoRenderer interface. | 
| 41   void OnSessionConfig(const protocol::SessionConfig& config) override; | 42   void OnSessionConfig(const protocol::SessionConfig& config) override; | 
| 42   protocol::VideoStub* GetVideoStub() override; | 43   protocol::VideoStub* GetVideoStub() override; | 
| 43 | 44 | 
| 44   // protocol::VideoStub interface. | 45   // protocol::VideoStub interface. | 
| 45   void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 46   void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 84   // NOTE: Weak pointers must be invalidated before all other member variables. | 85   // NOTE: Weak pointers must be invalidated before all other member variables. | 
| 85   base::WeakPtrFactory<TestVideoRenderer> weak_factory_; | 86   base::WeakPtrFactory<TestVideoRenderer> weak_factory_; | 
| 86 | 87 | 
| 87   DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); | 88   DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); | 
| 88 }; | 89 }; | 
| 89 | 90 | 
| 90 }  // namespace test | 91 }  // namespace test | 
| 91 }  // namespace remoting | 92 }  // namespace remoting | 
| 92 | 93 | 
| 93 #endif  // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 94 #endif  // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 
| OLD | NEW | 
|---|