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

Side by Side Diff: remoting/protocol/message_reader.cc

Issue 2146213002: Add support for dynamic channels in WebrtcTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « remoting/protocol/message_pipe.h ('k') | remoting/protocol/stream_message_pipe_adapter.h » ('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 #include "remoting/protocol/message_reader.h" 5 #include "remoting/protocol/message_reader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (!buffer) 107 if (!buffer)
108 break; 108 break;
109 base::ThreadTaskRunnerHandle::Get()->PostTask( 109 base::ThreadTaskRunnerHandle::Get()->PostTask(
110 FROM_HERE, 110 FROM_HERE,
111 base::Bind(&MessageReader::RunCallback, weak_factory_.GetWeakPtr(), 111 base::Bind(&MessageReader::RunCallback, weak_factory_.GetWeakPtr(),
112 base::Passed(base::WrapUnique(buffer)))); 112 base::Passed(base::WrapUnique(buffer))));
113 } 113 }
114 } 114 }
115 115
116 void MessageReader::RunCallback(std::unique_ptr<CompoundBuffer> message) { 116 void MessageReader::RunCallback(std::unique_ptr<CompoundBuffer> message) {
117 if (!message_received_callback_.is_null()) 117 if (!message_received_callback_.is_null()) {
118 message_received_callback_.Run(std::move(message)); 118 message_received_callback_.Run(std::move(message));
119 }
119 } 120 }
120 121
121 } // namespace protocol 122 } // namespace protocol
122 } // namespace remoting 123 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/message_pipe.h ('k') | remoting/protocol/stream_message_pipe_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698