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

Unified Diff: blimp/client/session/blimp_client_session.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: Put TestingLocationArbitrator out of anonymous namespace. Created 4 years, 3 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
« no previous file with comments | « blimp/client/session/blimp_client_session.h ('k') | blimp/engine/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/session/blimp_client_session.cc
diff --git a/blimp/client/session/blimp_client_session.cc b/blimp/client/session/blimp_client_session.cc
index 04ba1b79083b4118747ced61299ebad3aea6df2f..854c6270725b4ca3233651fe7fc63884a0087c10 100644
--- a/blimp/client/session/blimp_client_session.cc
+++ b/blimp/client/session/blimp_client_session.cc
@@ -20,6 +20,7 @@
#include "blimp/client/core/contents/ime_feature.h"
#include "blimp/client/core/contents/navigation_feature.h"
#include "blimp/client/core/contents/tab_control_feature.h"
+#include "blimp/client/core/geolocation/geolocation_feature.h"
#include "blimp/client/core/render_widget/render_widget_feature.h"
#include "blimp/client/core/session/client_network_components.h"
#include "blimp/client/core/session/cross_thread_network_event_observer.h"
@@ -30,6 +31,8 @@
#include "blimp/net/blob_channel/blob_channel_receiver.h"
#include "blimp/net/blob_channel/helium_blob_receiver_delegate.h"
#include "blimp/net/thread_pipe_manager.h"
+#include "device/geolocation/geolocation_delegate.h"
+#include "device/geolocation/location_arbitrator.h"
#include "url/gurl.h"
namespace blimp {
@@ -37,6 +40,9 @@ namespace client {
BlimpClientSession::BlimpClientSession(const GURL& assigner_endpoint)
: io_thread_("BlimpIOThread"),
+ geolocation_feature_(base::MakeUnique<GeolocationFeature>(
+ base::MakeUnique<device::LocationArbitrator>(
+ base::MakeUnique<device::GeolocationDelegate>()))),
tab_control_feature_(new TabControlFeature),
navigation_feature_(new NavigationFeature),
ime_feature_(new ImeFeature),
@@ -108,6 +114,9 @@ void BlimpClientSession::RegisterFeatures() {
io_thread_.task_runner(), net_components_->GetBrowserConnectionHandler());
// Register features' message senders and receivers.
+ geolocation_feature_->set_outgoing_message_processor(
+ thread_pipe_manager_->RegisterFeature(BlimpMessage::kGeolocation,
+ geolocation_feature_.get()));
tab_control_feature_->set_outgoing_message_processor(
thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl,
tab_control_feature_.get()));
« no previous file with comments | « blimp/client/session/blimp_client_session.h ('k') | blimp/engine/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698