| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 46     NavigationMessage** navigation_message, | 46     NavigationMessage** navigation_message, | 
| 47     int target_tab_id) { | 47     int target_tab_id) { | 
| 48   DCHECK(navigation_message); | 48   DCHECK(navigation_message); | 
| 49   scoped_ptr<BlimpMessage> output(new BlimpMessage); | 49   scoped_ptr<BlimpMessage> output(new BlimpMessage); | 
| 50   output->set_type(BlimpMessage::NAVIGATION); | 50   output->set_type(BlimpMessage::NAVIGATION); | 
| 51   output->set_target_tab_id(target_tab_id); | 51   output->set_target_tab_id(target_tab_id); | 
| 52   *navigation_message = output->mutable_navigation(); | 52   *navigation_message = output->mutable_navigation(); | 
| 53   return output; | 53   return output; | 
| 54 } | 54 } | 
| 55 | 55 | 
|  | 56 scoped_ptr<BlimpMessage> CreateBlimpMessage(ImeMessage** ime_message, | 
|  | 57                                             int target_tab_id) { | 
|  | 58   DCHECK(ime_message); | 
|  | 59   scoped_ptr<BlimpMessage> output(new BlimpMessage); | 
|  | 60   output->set_type(BlimpMessage::IME); | 
|  | 61   output->set_target_tab_id(target_tab_id); | 
|  | 62   *ime_message = output->mutable_ime(); | 
|  | 63   return output; | 
|  | 64 } | 
|  | 65 | 
| 56 scoped_ptr<BlimpMessage> CreateBlimpMessage( | 66 scoped_ptr<BlimpMessage> CreateBlimpMessage( | 
| 57     RenderWidgetMessage** render_widget_message, | 67     RenderWidgetMessage** render_widget_message, | 
| 58     int target_tab_id) { | 68     int target_tab_id) { | 
| 59   DCHECK(render_widget_message); | 69   DCHECK(render_widget_message); | 
| 60   scoped_ptr<BlimpMessage> output(new BlimpMessage); | 70   scoped_ptr<BlimpMessage> output(new BlimpMessage); | 
| 61   output->set_type(BlimpMessage::RENDER_WIDGET); | 71   output->set_type(BlimpMessage::RENDER_WIDGET); | 
| 62   output->set_target_tab_id(target_tab_id); | 72   output->set_target_tab_id(target_tab_id); | 
| 63   *render_widget_message = output->mutable_render_widget(); | 73   *render_widget_message = output->mutable_render_widget(); | 
| 64   return output; | 74   return output; | 
| 65 } | 75 } | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 98   control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK); | 108   control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK); | 
| 99 | 109 | 
| 100   CheckpointAckMessage* checkpoint_ack_message = | 110   CheckpointAckMessage* checkpoint_ack_message = | 
| 101       control_message->mutable_checkpoint_ack(); | 111       control_message->mutable_checkpoint_ack(); | 
| 102   checkpoint_ack_message->set_checkpoint_id(checkpoint_id); | 112   checkpoint_ack_message->set_checkpoint_id(checkpoint_id); | 
| 103 | 113 | 
| 104   return output; | 114   return output; | 
| 105 } | 115 } | 
| 106 | 116 | 
| 107 }  // namespace blimp | 117 }  // namespace blimp | 
| OLD | NEW | 
|---|