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/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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 AssignmentSource::Result result, | 207 AssignmentSource::Result result, |
208 const Assignment& assignment) {} | 208 const Assignment& assignment) {} |
209 | 209 |
210 void BlimpClientSession::RegisterFeatures() { | 210 void BlimpClientSession::RegisterFeatures() { |
211 thread_pipe_manager_ = base::WrapUnique(new ThreadPipeManager( | 211 thread_pipe_manager_ = base::WrapUnique(new ThreadPipeManager( |
212 io_thread_.task_runner(), base::SequencedTaskRunnerHandle::Get(), | 212 io_thread_.task_runner(), base::SequencedTaskRunnerHandle::Get(), |
213 net_components_->GetBrowserConnectionHandler())); | 213 net_components_->GetBrowserConnectionHandler())); |
214 | 214 |
215 // Register features' message senders and receivers. | 215 // Register features' message senders and receivers. |
216 tab_control_feature_->set_outgoing_message_processor( | 216 tab_control_feature_->set_outgoing_message_processor( |
217 thread_pipe_manager_->RegisterFeature(BlimpMessage::TAB_CONTROL, | 217 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl, |
218 tab_control_feature_.get())); | 218 tab_control_feature_.get())); |
219 navigation_feature_->set_outgoing_message_processor( | 219 navigation_feature_->set_outgoing_message_processor( |
220 thread_pipe_manager_->RegisterFeature(BlimpMessage::NAVIGATION, | 220 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation, |
221 navigation_feature_.get())); | 221 navigation_feature_.get())); |
222 render_widget_feature_->set_outgoing_input_message_processor( | 222 render_widget_feature_->set_outgoing_input_message_processor( |
223 thread_pipe_manager_->RegisterFeature(BlimpMessage::INPUT, | 223 thread_pipe_manager_->RegisterFeature(BlimpMessage::kInput, |
224 render_widget_feature_.get())); | 224 render_widget_feature_.get())); |
225 render_widget_feature_->set_outgoing_compositor_message_processor( | 225 render_widget_feature_->set_outgoing_compositor_message_processor( |
226 thread_pipe_manager_->RegisterFeature(BlimpMessage::COMPOSITOR, | 226 thread_pipe_manager_->RegisterFeature(BlimpMessage::kCompositor, |
227 render_widget_feature_.get())); | 227 render_widget_feature_.get())); |
228 settings_feature_->set_outgoing_message_processor( | 228 settings_feature_->set_outgoing_message_processor( |
229 thread_pipe_manager_->RegisterFeature(BlimpMessage::SETTINGS, | 229 thread_pipe_manager_->RegisterFeature(BlimpMessage::kSettings, |
230 settings_feature_.get())); | 230 settings_feature_.get())); |
231 | 231 |
232 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 232 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
233 switches::kDownloadWholeDocument)) | 233 switches::kDownloadWholeDocument)) |
234 settings_feature_->SetRecordWholeDocument(true); | 234 settings_feature_->SetRecordWholeDocument(true); |
235 | 235 |
236 // Client will not send send any RenderWidget messages, so don't save the | 236 // Client will not send send any RenderWidget messages, so don't save the |
237 // outgoing BlimpMessageProcessor in the RenderWidgetFeature. | 237 // outgoing BlimpMessageProcessor in the RenderWidgetFeature. |
238 thread_pipe_manager_->RegisterFeature(BlimpMessage::RENDER_WIDGET, | 238 thread_pipe_manager_->RegisterFeature(BlimpMessage::kRenderWidget, |
239 render_widget_feature_.get()); | 239 render_widget_feature_.get()); |
240 | 240 |
241 ime_feature_->set_outgoing_message_processor( | 241 ime_feature_->set_outgoing_message_processor( |
242 thread_pipe_manager_->RegisterFeature(BlimpMessage::IME, | 242 thread_pipe_manager_->RegisterFeature(BlimpMessage::kIme, |
243 ime_feature_.get())); | 243 ime_feature_.get())); |
244 } | 244 } |
245 | 245 |
246 void BlimpClientSession::OnConnected() {} | 246 void BlimpClientSession::OnConnected() {} |
247 | 247 |
248 void BlimpClientSession::OnDisconnected(int result) {} | 248 void BlimpClientSession::OnDisconnected(int result) {} |
249 | 249 |
250 TabControlFeature* BlimpClientSession::GetTabControlFeature() const { | 250 TabControlFeature* BlimpClientSession::GetTabControlFeature() const { |
251 return tab_control_feature_.get(); | 251 return tab_control_feature_.get(); |
252 } | 252 } |
253 | 253 |
254 NavigationFeature* BlimpClientSession::GetNavigationFeature() const { | 254 NavigationFeature* BlimpClientSession::GetNavigationFeature() const { |
255 return navigation_feature_.get(); | 255 return navigation_feature_.get(); |
256 } | 256 } |
257 | 257 |
258 ImeFeature* BlimpClientSession::GetImeFeature() const { | 258 ImeFeature* BlimpClientSession::GetImeFeature() const { |
259 return ime_feature_.get(); | 259 return ime_feature_.get(); |
260 } | 260 } |
261 | 261 |
262 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const { | 262 RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const { |
263 return render_widget_feature_.get(); | 263 return render_widget_feature_.get(); |
264 } | 264 } |
265 | 265 |
266 SettingsFeature* BlimpClientSession::GetSettingsFeature() const { | 266 SettingsFeature* BlimpClientSession::GetSettingsFeature() const { |
267 return settings_feature_.get(); | 267 return settings_feature_.get(); |
268 } | 268 } |
269 | 269 |
270 } // namespace client | 270 } // namespace client |
271 } // namespace blimp | 271 } // namespace blimp |
OLD | NEW |