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

Side by Side Diff: blimp/client/session/blimp_client_session.cc

Issue 1933053003: Used oneof in blimp_message.proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added oneof to protocol_control.proto Created 4 years, 7 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/client/session/blimp_client_session.h" 5 #include "blimp/client/session/blimp_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 AssignmentSource::Result result, 215 AssignmentSource::Result result,
216 const Assignment& assignment) {} 216 const Assignment& assignment) {}
217 217
218 void BlimpClientSession::RegisterFeatures() { 218 void BlimpClientSession::RegisterFeatures() {
219 thread_pipe_manager_ = base::WrapUnique(new ThreadPipeManager( 219 thread_pipe_manager_ = base::WrapUnique(new ThreadPipeManager(
220 io_thread_.task_runner(), base::SequencedTaskRunnerHandle::Get(), 220 io_thread_.task_runner(), base::SequencedTaskRunnerHandle::Get(),
221 net_components_->GetBrowserConnectionHandler())); 221 net_components_->GetBrowserConnectionHandler()));
222 222
223 // Register features' message senders and receivers. 223 // Register features' message senders and receivers.
224 tab_control_feature_->set_outgoing_message_processor( 224 tab_control_feature_->set_outgoing_message_processor(
225 thread_pipe_manager_->RegisterFeature(BlimpMessage::TAB_CONTROL, 225 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl,
226 tab_control_feature_.get())); 226 tab_control_feature_.get()));
227 navigation_feature_->set_outgoing_message_processor( 227 navigation_feature_->set_outgoing_message_processor(
228 thread_pipe_manager_->RegisterFeature(BlimpMessage::NAVIGATION, 228 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation,
229 navigation_feature_.get())); 229 navigation_feature_.get()));
230 render_widget_feature_->set_outgoing_input_message_processor( 230 render_widget_feature_->set_outgoing_input_message_processor(
231 thread_pipe_manager_->RegisterFeature(BlimpMessage::INPUT, 231 thread_pipe_manager_->RegisterFeature(BlimpMessage::kInput,
232 render_widget_feature_.get())); 232 render_widget_feature_.get()));
233 render_widget_feature_->set_outgoing_compositor_message_processor( 233 render_widget_feature_->set_outgoing_compositor_message_processor(
234 thread_pipe_manager_->RegisterFeature(BlimpMessage::COMPOSITOR, 234 thread_pipe_manager_->RegisterFeature(BlimpMessage::kCompositor,
235 render_widget_feature_.get())); 235 render_widget_feature_.get()));
236 settings_feature_->set_outgoing_message_processor( 236 settings_feature_->set_outgoing_message_processor(
237 thread_pipe_manager_->RegisterFeature(BlimpMessage::SETTINGS, 237 thread_pipe_manager_->RegisterFeature(BlimpMessage::kSettings,
238 settings_feature_.get())); 238 settings_feature_.get()));
239 239
240 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 240 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
241 switches::kDownloadWholeDocument)) 241 switches::kDownloadWholeDocument))
242 settings_feature_->SetRecordWholeDocument(true); 242 settings_feature_->SetRecordWholeDocument(true);
243 243
244 // Client will not send send any RenderWidget messages, so don't save the 244 // Client will not send send any RenderWidget messages, so don't save the
Kevin M 2016/05/20 18:28:15 Move the HasSwitch code to the end of the function
shaktisahu 2016/05/20 22:29:41 Done.
245 // outgoing BlimpMessageProcessor in the RenderWidgetFeature. 245 // outgoing BlimpMessageProcessor in the RenderWidgetFeature.
246 thread_pipe_manager_->RegisterFeature(BlimpMessage::RENDER_WIDGET, 246 thread_pipe_manager_->RegisterFeature(BlimpMessage::kRenderWidget,
247 render_widget_feature_.get()); 247 render_widget_feature_.get());
248 248
249 ime_feature_->set_outgoing_message_processor( 249 ime_feature_->set_outgoing_message_processor(
250 thread_pipe_manager_->RegisterFeature(BlimpMessage::IME, 250 thread_pipe_manager_->RegisterFeature(BlimpMessage::kIme,
251 ime_feature_.get())); 251 ime_feature_.get()));
252 } 252 }
253 253
254 void BlimpClientSession::OnConnected() {} 254 void BlimpClientSession::OnConnected() {}
255 255
256 void BlimpClientSession::OnDisconnected(int result) {} 256 void BlimpClientSession::OnDisconnected(int result) {}
257 257
258 TabControlFeature* BlimpClientSession::GetTabControlFeature() const { 258 TabControlFeature* BlimpClientSession::GetTabControlFeature() const {
259 return tab_control_feature_.get(); 259 return tab_control_feature_.get();
260 } 260 }
261 261
262 NavigationFeature* BlimpClientSession::GetNavigationFeature() const { 262 NavigationFeature* BlimpClientSession::GetNavigationFeature() const {
263 return navigation_feature_.get(); 263 return navigation_feature_.get();
264 } 264 }
265 265
266 ImeFeature* BlimpClientSession::GetImeFeature() const { 266 ImeFeature* BlimpClientSession::GetImeFeature() const {
267 return ime_feature_.get(); 267 return ime_feature_.get();
268 } 268 }
269 269
270 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const { 270 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const {
271 return render_widget_feature_.get(); 271 return render_widget_feature_.get();
272 } 272 }
273 273
274 SettingsFeature* BlimpClientSession::GetSettingsFeature() const { 274 SettingsFeature* BlimpClientSession::GetSettingsFeature() const {
275 return settings_feature_.get(); 275 return settings_feature_.get();
276 } 276 }
277 277
278 } // namespace client 278 } // namespace client
279 } // namespace blimp 279 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698