OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/common/create_blimp_message.h" | 5 #include "blimp/common/create_blimp_message.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "blimp/common/proto/blimp_message.pb.h" | 9 #include "blimp/common/proto/blimp_message.pb.h" |
10 #include "blimp/common/proto/compositor.pb.h" | 10 #include "blimp/common/proto/compositor.pb.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 control_message->set_type(ProtocolControlMessage::START_CONNECTION); | 84 control_message->set_type(ProtocolControlMessage::START_CONNECTION); |
85 | 85 |
86 StartConnectionMessage* start_connection_message = | 86 StartConnectionMessage* start_connection_message = |
87 control_message->mutable_start_connection(); | 87 control_message->mutable_start_connection(); |
88 start_connection_message->set_client_token(client_token); | 88 start_connection_message->set_client_token(client_token); |
89 start_connection_message->set_protocol_version(protocol_version); | 89 start_connection_message->set_protocol_version(protocol_version); |
90 | 90 |
91 return output; | 91 return output; |
92 } | 92 } |
93 | 93 |
94 scoped_ptr<BlimpMessage> CreateCheckpointAckMessage(int64 checkpoint_id) { | 94 scoped_ptr<BlimpMessage> CreateCheckpointAckMessage(int64_t checkpoint_id) { |
95 scoped_ptr<BlimpMessage> output(new BlimpMessage); | 95 scoped_ptr<BlimpMessage> output(new BlimpMessage); |
96 output->set_type(BlimpMessage::PROTOCOL_CONTROL); | 96 output->set_type(BlimpMessage::PROTOCOL_CONTROL); |
97 | 97 |
98 ProtocolControlMessage* control_message = output->mutable_protocol_control(); | 98 ProtocolControlMessage* control_message = output->mutable_protocol_control(); |
99 control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK); | 99 control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK); |
100 | 100 |
101 CheckpointAckMessage* checkpoint_ack_message = | 101 CheckpointAckMessage* checkpoint_ack_message = |
102 control_message->mutable_checkpoint_ack(); | 102 control_message->mutable_checkpoint_ack(); |
103 checkpoint_ack_message->set_checkpoint_id(checkpoint_id); | 103 checkpoint_ack_message->set_checkpoint_id(checkpoint_id); |
104 | 104 |
105 return output; | 105 return output; |
106 } | 106 } |
107 | 107 |
108 } // namespace blimp | 108 } // namespace blimp |
OLD | NEW |