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

Side by Side Diff: content/browser/geolocation/geolocation_service_context.cc

Issue 1373883003: Move geolocation and permission mojoms into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/geolocation/geolocation_service_context.h" 5 #include "content/browser/geolocation/geolocation_service_context.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 GeolocationServiceContext::GeolocationServiceContext() : paused_(false) { 9 GeolocationServiceContext::GeolocationServiceContext() : paused_(false) {
10 } 10 }
11 11
12 GeolocationServiceContext::~GeolocationServiceContext() { 12 GeolocationServiceContext::~GeolocationServiceContext() {
13 } 13 }
14 14
15 void GeolocationServiceContext::CreateService( 15 void GeolocationServiceContext::CreateService(
16 const base::Closure& update_callback, 16 const base::Closure& update_callback,
17 mojo::InterfaceRequest<GeolocationService> request) { 17 mojo::InterfaceRequest<geolocation::GeolocationService> request) {
18 GeolocationServiceImpl* service = 18 GeolocationServiceImpl* service =
19 new GeolocationServiceImpl(request.Pass(), this, update_callback); 19 new GeolocationServiceImpl(request.Pass(), this, update_callback);
20 services_.push_back(service); 20 services_.push_back(service);
21 if (geoposition_override_) 21 if (geoposition_override_)
22 service->SetOverride(*geoposition_override_.get()); 22 service->SetOverride(*geoposition_override_.get());
23 else 23 else
24 service->StartListeningForUpdates(); 24 service->StartListeningForUpdates();
25 } 25 }
26 26
27 void GeolocationServiceContext::ServiceHadConnectionError( 27 void GeolocationServiceContext::ServiceHadConnectionError(
(...skipping 25 matching lines...) Expand all
53 } 53 }
54 } 54 }
55 55
56 void GeolocationServiceContext::ClearOverride() { 56 void GeolocationServiceContext::ClearOverride() {
57 for (auto* service : services_) { 57 for (auto* service : services_) {
58 service->ClearOverride(); 58 service->ClearOverride();
59 } 59 }
60 } 60 }
61 61
62 } // namespace content 62 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_service_context.h ('k') | content/browser/geolocation/geolocation_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698