Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / remoting / protocol / channel_multiplexer.cc
index e8c195a..5751440 100644 (file)
@@ -58,11 +58,11 @@ const char ChannelMultiplexer::kMuxChannelName[] = "mux";
 
 struct ChannelMultiplexer::PendingChannel {
   PendingChannel(const std::string& name,
-                 const StreamChannelCallback& callback)
+                 const ChannelCreatedCallback& callback)
       : name(name), callback(callback) {
   }
   std::string name;
-  StreamChannelCallback callback;
+  ChannelCreatedCallback callback;
 };
 
 class ChannelMultiplexer::MuxChannel {
@@ -353,7 +353,7 @@ void ChannelMultiplexer::MuxSocket::OnPacketReceived() {
   }
 }
 
-ChannelMultiplexer::ChannelMultiplexer(ChannelFactory* factory,
+ChannelMultiplexer::ChannelMultiplexer(StreamChannelFactory* factory,
                                        const std::string& base_channel_name)
     : base_channel_factory_(factory),
       base_channel_name_(base_channel_name),
@@ -370,9 +370,8 @@ ChannelMultiplexer::~ChannelMultiplexer() {
     base_channel_factory_->CancelChannelCreation(base_channel_name_);
 }
 
-void ChannelMultiplexer::CreateStreamChannel(
-    const std::string& name,
-    const StreamChannelCallback& callback) {
+void ChannelMultiplexer::CreateChannel(const std::string& name,
+                                       const ChannelCreatedCallback& callback) {
   if (base_channel_.get()) {
     // Already have |base_channel_|. Create new multiplexed channel
     // synchronously.
@@ -386,7 +385,7 @@ void ChannelMultiplexer::CreateStreamChannel(
 
     // If this is the first multiplexed channel then create the base channel.
     if (pending_channels_.size() == 1U) {
-      base_channel_factory_->CreateStreamChannel(
+      base_channel_factory_->CreateChannel(
           base_channel_name_,
           base::Bind(&ChannelMultiplexer::OnBaseChannelReady,
                      base::Unretained(this)));
@@ -394,13 +393,6 @@ void ChannelMultiplexer::CreateStreamChannel(
   }
 }
 
-void ChannelMultiplexer::CreateDatagramChannel(
-    const std::string& name,
-    const DatagramChannelCallback& callback) {
-  NOTIMPLEMENTED();
-  callback.Run(scoped_ptr<net::Socket>());
-}
-
 void ChannelMultiplexer::CancelChannelCreation(const std::string& name) {
   for (std::list<PendingChannel>::iterator it = pending_channels_.begin();
        it != pending_channels_.end(); ++it) {