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

Unified Diff: blimp/client/core/blimp_client_context_impl.cc

Issue 2249283003: Hooks together Geolocation Feature in the Client and Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lai
Patch Set: Addresses nyquist's #9 comments. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698