Index: blimp/client/core/blimp_client_context_impl.cc |
diff --git a/blimp/client/core/blimp_client_context_impl.cc b/blimp/client/core/blimp_client_context_impl.cc |
index f90b1dc02b222929b3e0851a1a240809064d7aa0..653be28ab7e4b89414095835449b1edc07897303 100644 |
--- a/blimp/client/core/blimp_client_context_impl.cc |
+++ b/blimp/client/core/blimp_client_context_impl.cc |
@@ -10,6 +10,8 @@ |
#include "base/threading/sequenced_task_runner_handle.h" |
#include "blimp/client/core/contents/blimp_contents_impl.h" |
#include "blimp/client/core/contents/blimp_contents_manager.h" |
+#include "blimp/client/core/geolocation/blimp_location_provider.h" |
+#include "blimp/client/core/geolocation/geolocation_feature.h" |
#include "blimp/client/core/session/cross_thread_network_event_observer.h" |
#include "blimp/client/public/blimp_client_context_delegate.h" |
@@ -49,6 +51,8 @@ BlimpClientContextImpl::BlimpClientContextImpl( |
io_thread_task_runner_(io_thread_task_runner), |
file_thread_task_runner_(file_thread_task_runner), |
blimp_contents_manager_(new BlimpContentsManager), |
+ geolocation_feature_(new GeolocationFeature( |
Kevin M
2016/08/19 17:51:37
How come this is stored in both the ClientContext
CJ
2016/08/19 20:44:01
nyquist's suggestion. Based on what was discussed
|
+ base::MakeUnique<BlimpLocationProvider>())), |
weak_factory_(this) { |
net_components_.reset(new ClientNetworkComponents( |
base::MakeUnique<CrossThreadNetworkEventObserver>( |
@@ -59,6 +63,8 @@ BlimpClientContextImpl::BlimpClientContextImpl( |
thread_pipe_manager_ = base::MakeUnique<ThreadPipeManager>( |
io_thread_task_runner_, net_components_->GetBrowserConnectionHandler()); |
+ RegisterFeatures(); |
+ |
// Initialize must only be posted after the calls features have been |
// registered. |
Wez
2016/08/19 23:12:10
nit: While you're here can you correct this typo,
CJ
2016/08/22 20:28:08
Done.
|
io_thread_task_runner_->PostTask( |
@@ -122,5 +128,12 @@ void BlimpClientContextImpl::ConnectWithAssignment( |
base::Unretained(net_components_.get()), assignment)); |
} |
+void BlimpClientContextImpl::RegisterFeatures() { |
+ // Register features' message senders and receivers. |
Kevin M
2016/08/19 17:51:37
Move this comment to the .h file
CJ
2016/08/19 20:44:01
Done.
|
+ geolocation_feature_->set_outgoing_message_processor( |
+ thread_pipe_manager_->RegisterFeature(BlimpMessage::kGeolocation, |
+ geolocation_feature_.get())); |
+} |
+ |
} // namespace client |
} // namespace blimp |