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

Unified Diff: remoting/base/decoder.h

Issue 3124005: Move UpdateStreamEncoding value into the BeginUpdateStreamMessage since we... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/base/decoder_verbatim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder.h
===================================================================
--- remoting/base/decoder.h (revision 57131)
+++ remoting/base/decoder.h (working copy)
@@ -37,7 +37,10 @@
// decoder (most likely the renderer) and the decoder.
class Decoder {
public:
-
+ Decoder()
+ : encoding_(EncodingInvalid),
+ started_(false) {
+ }
virtual ~Decoder() {
}
@@ -80,6 +83,13 @@
// decoder should also call |decode_done_| as soon as possible.
virtual void EndDecode() = 0;
+ // Return the encoding type that this decoder handles.
+ virtual UpdateStreamEncoding Encoding() { return encoding_; }
+
+ // Return the current state of the decoder: 'true' if we're in the middle
+ // of BeginDecode() / EndDecode().
+ virtual bool IsStarted() { return started_; }
+
protected:
// Every decoder will have two internal states because there are three
// kinds of messages send to PartialDecode().
@@ -107,6 +117,12 @@
// is received.
kWaitingForRectData,
};
+
+ // The encoding that this decoder supports.
+ UpdateStreamEncoding encoding_;
+
+ // Has the decoder been started? I.e., has BeginDecode() been called.
+ bool started_;
};
} // namespace remoting
« no previous file with comments | « no previous file | remoting/base/decoder_verbatim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698