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

Side by Side Diff: blimp/engine/app/blimp_content_browser_client.cc

Issue 2104193002: Geolocation: Extract GeolocationProvider::Delegate into GeolocationDelegate (no new code) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jam@ nit: content/browser/geolocation/geolocation_delegate.cc --> content/public/browser Created 4 years, 5 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/app/blimp_content_browser_client.h" 5 #include "blimp/engine/app/blimp_content_browser_client.h"
6 #include "blimp/engine/app/blimp_browser_main_parts.h" 6 #include "blimp/engine/app/blimp_browser_main_parts.h"
7 #include "blimp/engine/app/settings_manager.h" 7 #include "blimp/engine/app/settings_manager.h"
8 #include "blimp/engine/feature/geolocation/blimp_location_provider.h" 8 #include "blimp/engine/feature/geolocation/blimp_location_provider.h"
9 #include "blimp/engine/mojo/blob_channel_service.h" 9 #include "blimp/engine/mojo/blob_channel_service.h"
10 #include "content/public/browser/geolocation_delegate.h"
10 #include "services/shell/public/cpp/interface_registry.h" 11 #include "services/shell/public/cpp/interface_registry.h"
11 12
12 namespace blimp { 13 namespace blimp {
13 namespace engine { 14 namespace engine {
14 15
15 namespace { 16 namespace {
16 // A provider of services needed by Geolocation. 17 // A provider of services needed by Geolocation.
17 class BlimpGeolocationDelegate : public content::GeolocationProvider::Delegate { 18 class BlimpGeolocationDelegate : public content::GeolocationDelegate {
18 public: 19 public:
19 BlimpGeolocationDelegate() = default; 20 BlimpGeolocationDelegate() = default;
20 21
21 bool UseNetworkLocationProviders() final { return false; } 22 bool UseNetworkLocationProviders() final { return false; }
22 23
23 content::LocationProvider* OverrideSystemLocationProvider() final { 24 content::LocationProvider* OverrideSystemLocationProvider() final {
24 if (!location_provider_) 25 if (!location_provider_)
25 location_provider_ = base::WrapUnique(new BlimpLocationProvider()); 26 location_provider_ = base::WrapUnique(new BlimpLocationProvider());
26 return location_provider_.get(); 27 return location_provider_.get();
27 } 28 }
(...skipping 27 matching lines...) Expand all
55 return; 56 return;
56 57
57 blimp_browser_main_parts_->GetSettingsManager()->UpdateWebkitPreferences( 58 blimp_browser_main_parts_->GetSettingsManager()->UpdateWebkitPreferences(
58 prefs); 59 prefs);
59 } 60 }
60 61
61 BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() { 62 BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() {
62 return blimp_browser_main_parts_->GetBrowserContext(); 63 return blimp_browser_main_parts_->GetBrowserContext();
63 } 64 }
64 65
65 content::GeolocationProvider::Delegate* 66 content::GeolocationDelegate*
66 BlimpContentBrowserClient::CreateGeolocationDelegate() { 67 BlimpContentBrowserClient::CreateGeolocationDelegate() {
67 return new BlimpGeolocationDelegate(); 68 return new BlimpGeolocationDelegate();
68 } 69 }
69 70
70 void BlimpContentBrowserClient::ExposeInterfacesToRenderer( 71 void BlimpContentBrowserClient::ExposeInterfacesToRenderer(
71 shell::InterfaceRegistry* registry, 72 shell::InterfaceRegistry* registry,
72 content::RenderProcessHost* render_process_host) { 73 content::RenderProcessHost* render_process_host) {
73 registry->AddInterface<mojom::BlobChannel>( 74 registry->AddInterface<mojom::BlobChannel>(
74 base::Bind(&BlobChannelService::Create, 75 base::Bind(&BlobChannelService::Create,
75 blimp_browser_main_parts_->GetBlobChannelSender())); 76 blimp_browser_main_parts_->GetBlobChannelSender()));
76 } 77 }
77 78
78 } // namespace engine 79 } // namespace engine
79 } // namespace blimp 80 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698