| 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/engine/session/blimp_engine_session.h" | 5 #include "blimp/engine/session/blimp_engine_session.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 // Initialize must only be posted after the RegisterFeature calls have | 286 // Initialize must only be posted after the RegisterFeature calls have |
| 287 // completed. | 287 // completed. |
| 288 content::BrowserThread::PostTask( | 288 content::BrowserThread::PostTask( |
| 289 content::BrowserThread::IO, FROM_HERE, | 289 content::BrowserThread::IO, FROM_HERE, |
| 290 base::Bind(&EngineNetworkComponents::Initialize, | 290 base::Bind(&EngineNetworkComponents::Initialize, |
| 291 base::Unretained(net_components_.get()), | 291 base::Unretained(net_components_.get()), |
| 292 engine_config_->client_token())); | 292 engine_config_->client_token())); |
| 293 } | 293 } |
| 294 | 294 |
| 295 EngineGeolocationFeature* BlimpEngineSession::GetGeolocationFeature() { |
| 296 return &geolocation_feature_; |
| 297 } |
| 298 |
| 295 void BlimpEngineSession::GetEnginePortForTesting( | 299 void BlimpEngineSession::GetEnginePortForTesting( |
| 296 const GetPortCallback& callback) { | 300 const GetPortCallback& callback) { |
| 297 content::BrowserThread::PostTaskAndReplyWithResult( | 301 content::BrowserThread::PostTaskAndReplyWithResult( |
| 298 content::BrowserThread::IO, FROM_HERE, | 302 content::BrowserThread::IO, FROM_HERE, |
| 299 base::Bind(&EngineNetworkComponents::GetPortForTesting, | 303 base::Bind(&EngineNetworkComponents::GetPortForTesting, |
| 300 base::Unretained(net_components_.get())), | 304 base::Unretained(net_components_.get())), |
| 301 callback); | 305 callback); |
| 302 } | 306 } |
| 303 | 307 |
| 304 void BlimpEngineSession::RegisterFeatures() { | 308 void BlimpEngineSession::RegisterFeatures() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 317 &render_widget_feature_)); | 321 &render_widget_feature_)); |
| 318 render_widget_feature_.set_input_message_sender( | 322 render_widget_feature_.set_input_message_sender( |
| 319 thread_pipe_manager_->RegisterFeature(BlimpMessage::kInput, | 323 thread_pipe_manager_->RegisterFeature(BlimpMessage::kInput, |
| 320 &render_widget_feature_)); | 324 &render_widget_feature_)); |
| 321 render_widget_feature_.set_compositor_message_sender( | 325 render_widget_feature_.set_compositor_message_sender( |
| 322 thread_pipe_manager_->RegisterFeature(BlimpMessage::kCompositor, | 326 thread_pipe_manager_->RegisterFeature(BlimpMessage::kCompositor, |
| 323 &render_widget_feature_)); | 327 &render_widget_feature_)); |
| 324 render_widget_feature_.set_ime_message_sender( | 328 render_widget_feature_.set_ime_message_sender( |
| 325 thread_pipe_manager_->RegisterFeature(BlimpMessage::kIme, | 329 thread_pipe_manager_->RegisterFeature(BlimpMessage::kIme, |
| 326 &render_widget_feature_)); | 330 &render_widget_feature_)); |
| 331 geolocation_feature_.set_outgoing_message_processor( |
| 332 thread_pipe_manager_->RegisterFeature(BlimpMessage::kGeolocation, |
| 333 &geolocation_feature_)); |
| 327 blob_delegate_->set_outgoing_message_processor( | 334 blob_delegate_->set_outgoing_message_processor( |
| 328 thread_pipe_manager_->RegisterFeature(BlimpMessage::kBlobChannel, | 335 thread_pipe_manager_->RegisterFeature(BlimpMessage::kBlobChannel, |
| 329 blob_delegate_)); | 336 blob_delegate_)); |
| 330 | 337 |
| 331 // The Settings feature does not need an outgoing message processor, since we | 338 // The Settings feature does not need an outgoing message processor, since we |
| 332 // don't send any messages to the client right now. | 339 // don't send any messages to the client right now. |
| 333 thread_pipe_manager_->RegisterFeature(BlimpMessage::kSettings, | 340 thread_pipe_manager_->RegisterFeature(BlimpMessage::kSettings, |
| 334 &settings_feature_); | 341 &settings_feature_); |
| 335 } | 342 } |
| 336 | 343 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 parent->AddChild(content); | 570 parent->AddChild(content); |
| 564 content->Show(); | 571 content->Show(); |
| 565 | 572 |
| 566 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, | 573 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, |
| 567 &render_widget_feature_, | 574 &render_widget_feature_, |
| 568 navigation_message_sender_.get())); | 575 navigation_message_sender_.get())); |
| 569 } | 576 } |
| 570 | 577 |
| 571 } // namespace engine | 578 } // namespace engine |
| 572 } // namespace blimp | 579 } // namespace blimp |
| OLD | NEW |