OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/geolocation/geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
9 #include "chrome/browser/permissions/permission_request_id.h" | 9 #include "chrome/browser/permissions/permission_request_id.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/permission_type.h" | 12 #include "content/public/browser/permission_type.h" |
13 #include "content/public/browser/render_frame_host.h" | 13 #include "content/public/browser/render_frame_host.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 #include "device/geolocation/geolocation_provider.h" | 15 #include "device/geolocation/geolocation_provider.h" |
16 | 16 |
17 #if defined(OS_ANDROID) | 17 #if defined(OS_ANDROID) |
18 #include "chrome/browser/android/search_geolocation_disclosure_infobar_delegate.
h" | 18 #include "chrome/browser/android/search_geolocation/search_geolocation_disclosur
e_infobar_delegate.h" |
19 #endif | 19 #endif |
20 | 20 |
21 GeolocationPermissionContext::GeolocationPermissionContext(Profile* profile) | 21 GeolocationPermissionContext::GeolocationPermissionContext(Profile* profile) |
22 : PermissionContextBase(profile, | 22 : PermissionContextBase(profile, |
23 content::PermissionType::GEOLOCATION, | 23 content::PermissionType::GEOLOCATION, |
24 CONTENT_SETTINGS_TYPE_GEOLOCATION), | 24 CONTENT_SETTINGS_TYPE_GEOLOCATION), |
25 extensions_context_(profile) {} | 25 extensions_context_(profile) {} |
26 | 26 |
27 GeolocationPermissionContext::~GeolocationPermissionContext() { | 27 GeolocationPermissionContext::~GeolocationPermissionContext() { |
28 } | 28 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 if (allowed) { | 100 if (allowed) { |
101 device::GeolocationProvider::GetInstance() | 101 device::GeolocationProvider::GetInstance() |
102 ->UserDidOptIntoLocationServices(); | 102 ->UserDidOptIntoLocationServices(); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 bool GeolocationPermissionContext::IsRestrictedToSecureOrigins() const { | 106 bool GeolocationPermissionContext::IsRestrictedToSecureOrigins() const { |
107 return true; | 107 return true; |
108 } | 108 } |
OLD | NEW |