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

Side by Side Diff: blimp/common/create_blimp_message.cc

Issue 1779673003: Added network components for blimp text input feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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
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 DCHECK(ime_message);
58 scoped_ptr<BlimpMessage> output(new BlimpMessage);
59 output->set_type(BlimpMessage::IME);
60 *ime_message = output->mutable_ime();
61 return output;
62 }
63
56 scoped_ptr<BlimpMessage> CreateBlimpMessage( 64 scoped_ptr<BlimpMessage> CreateBlimpMessage(
57 RenderWidgetMessage** render_widget_message, 65 RenderWidgetMessage** render_widget_message,
58 int target_tab_id) { 66 int target_tab_id) {
59 DCHECK(render_widget_message); 67 DCHECK(render_widget_message);
60 scoped_ptr<BlimpMessage> output(new BlimpMessage); 68 scoped_ptr<BlimpMessage> output(new BlimpMessage);
61 output->set_type(BlimpMessage::RENDER_WIDGET); 69 output->set_type(BlimpMessage::RENDER_WIDGET);
62 output->set_target_tab_id(target_tab_id); 70 output->set_target_tab_id(target_tab_id);
63 *render_widget_message = output->mutable_render_widget(); 71 *render_widget_message = output->mutable_render_widget();
64 return output; 72 return output;
65 } 73 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK); 106 control_message->set_type(ProtocolControlMessage::CHECKPOINT_ACK);
99 107
100 CheckpointAckMessage* checkpoint_ack_message = 108 CheckpointAckMessage* checkpoint_ack_message =
101 control_message->mutable_checkpoint_ack(); 109 control_message->mutable_checkpoint_ack();
102 checkpoint_ack_message->set_checkpoint_id(checkpoint_id); 110 checkpoint_ack_message->set_checkpoint_id(checkpoint_id);
103 111
104 return output; 112 return output;
105 } 113 }
106 114
107 } // namespace blimp 115 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698