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

Side by Side Diff: remoting/client/chromoting_client.h

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months 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
« no previous file with comments | « no previous file | remoting/client/chromoting_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // ChromotingClient is the controller for the Client implementation. 5 // ChromotingClient is the controller for the Client implementation.
6 6
7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 7 #ifndef REMOTING_CLIENT_CHROMOTING_CLIENT_H_
8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 8 #define REMOTING_CLIENT_CHROMOTING_CLIENT_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Return the stats recorded by this client. 49 // Return the stats recorded by this client.
50 ChromotingStats* GetStats(); 50 ChromotingStats* GetStats();
51 51
52 // ConnectionToHost::HostEventCallback implementation. 52 // ConnectionToHost::HostEventCallback implementation.
53 virtual void OnConnectionState( 53 virtual void OnConnectionState(
54 protocol::ConnectionToHost::State state, 54 protocol::ConnectionToHost::State state,
55 protocol::ErrorCode error) OVERRIDE; 55 protocol::ErrorCode error) OVERRIDE;
56 56
57 // VideoStub implementation. 57 // VideoStub implementation.
58 virtual void ProcessVideoPacket(const VideoPacket* packet, 58 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
59 const base::Closure& done) OVERRIDE; 59 const base::Closure& done) OVERRIDE;
60 virtual int GetPendingPackets() OVERRIDE; 60 virtual int GetPendingPackets() OVERRIDE;
61 61
62 private: 62 private:
63 struct QueuedVideoPacket { 63 struct QueuedVideoPacket {
64 QueuedVideoPacket(const VideoPacket* packet, const base::Closure& done); 64 QueuedVideoPacket(scoped_ptr<VideoPacket> packet,
65 const base::Closure& done);
65 ~QueuedVideoPacket(); 66 ~QueuedVideoPacket();
66 const VideoPacket* packet; 67 VideoPacket* packet;
67 base::Closure done; 68 base::Closure done;
68 }; 69 };
69 70
70 base::MessageLoopProxy* message_loop(); 71 base::MessageLoopProxy* message_loop();
71 72
72 // Initializes connection. 73 // Initializes connection.
73 void Initialize(); 74 void Initialize();
74 75
75 // If a packet is not being processed, dispatches a single message from the 76 // If a packet is not being processed, dispatches a single message from the
76 // |received_packets_| queue. 77 // |received_packets_| queue.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 int64 last_sequence_number_; 111 int64 last_sequence_number_;
111 112
112 ScopedThreadProxy thread_proxy_; 113 ScopedThreadProxy thread_proxy_;
113 114
114 DISALLOW_COPY_AND_ASSIGN(ChromotingClient); 115 DISALLOW_COPY_AND_ASSIGN(ChromotingClient);
115 }; 116 };
116 117
117 } // namespace remoting 118 } // namespace remoting
118 119
119 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_ 120 #endif // REMOTING_CLIENT_CHROMOTING_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698