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

Side by Side Diff: remoting/host/client_connection.cc

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail Created 10 years, 2 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 | « remoting/host/client_connection.h ('k') | remoting/host/differ.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/host/client_connection.h" 5 #include "remoting/host/client_connection.h"
6 6
7 #include "google/protobuf/message.h" 7 #include "google/protobuf/message.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "remoting/protocol/messages_decoder.h" 9 #include "remoting/protocol/messages_decoder.h"
10 #include "remoting/protocol/util.h" 10 #include "remoting/protocol/util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void ClientConnection::Disconnect() { 69 void ClientConnection::Disconnect() {
70 DCHECK_EQ(loop_, MessageLoop::current()); 70 DCHECK_EQ(loop_, MessageLoop::current());
71 71
72 // If there is a channel then close it and release the reference. 72 // If there is a channel then close it and release the reference.
73 if (connection_) { 73 if (connection_) {
74 connection_->Close(NewRunnableMethod(this, &ClientConnection::OnClosed)); 74 connection_->Close(NewRunnableMethod(this, &ClientConnection::OnClosed));
75 connection_ = NULL; 75 connection_ = NULL;
76 } 76 }
77 } 77 }
78 78
79 ClientConnection::ClientConnection() {}
80
79 void ClientConnection::OnConnectionStateChange( 81 void ClientConnection::OnConnectionStateChange(
80 ChromotingConnection::State state) { 82 ChromotingConnection::State state) {
81 if (state == ChromotingConnection::CONNECTED) { 83 if (state == ChromotingConnection::CONNECTED) {
82 events_reader_.Init( 84 events_reader_.Init(
83 connection_->GetEventsChannel(), 85 connection_->GetEventsChannel(),
84 NewCallback(this, &ClientConnection::OnMessageReceived)); 86 NewCallback(this, &ClientConnection::OnMessageReceived));
85 video_writer_.Init(connection_->GetVideoChannel()); 87 video_writer_.Init(connection_->GetVideoChannel());
86 } 88 }
87 89
88 loop_->PostTask(FROM_HERE, 90 loop_->PostTask(FROM_HERE,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DCHECK_EQ(loop_, MessageLoop::current()); 124 DCHECK_EQ(loop_, MessageLoop::current());
123 DCHECK(handler_); 125 DCHECK(handler_);
124 handler_->HandleMessage(this, message); 126 handler_->HandleMessage(this, message);
125 } 127 }
126 128
127 // OnClosed() is used as a callback for ChromotingConnection::Close(). 129 // OnClosed() is used as a callback for ChromotingConnection::Close().
128 void ClientConnection::OnClosed() { 130 void ClientConnection::OnClosed() {
129 } 131 }
130 132
131 } // namespace remoting 133 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_connection.h ('k') | remoting/host/differ.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698