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/geolocation_provider.h" | 12 #include "content/public/browser/geolocation_provider.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 | 15 |
16 | 16 |
17 GeolocationPermissionContext::GeolocationPermissionContext( | 17 GeolocationPermissionContext::GeolocationPermissionContext( |
18 Profile* profile) | 18 Profile* profile) |
19 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_GEOLOCATION), | 19 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_GEOLOCATION), |
20 extensions_context_(profile) { | 20 extensions_context_(profile) { |
21 } | 21 } |
22 | 22 |
23 GeolocationPermissionContext::~GeolocationPermissionContext() { | 23 GeolocationPermissionContext::~GeolocationPermissionContext() { |
24 } | 24 } |
25 | 25 |
26 // TODO: CHECK THIS | |
mlamouri (slow - plz ping)
2015/11/26 12:45:49
I think there is nothing to do here.
johnme
2015/11/26 18:28:48
Removed TODO.
| |
26 void GeolocationPermissionContext::DecidePermission( | 27 void GeolocationPermissionContext::DecidePermission( |
27 content::WebContents* web_contents, | 28 content::WebContents* web_contents, |
28 const PermissionRequestID& id, | 29 const PermissionRequestID& id, |
29 const GURL& requesting_origin, | 30 const GURL& requesting_origin, |
30 const GURL& embedding_origin, | 31 const GURL& embedding_origin, |
31 bool user_gesture, | 32 bool user_gesture, |
32 const BrowserPermissionCallback& callback) { | 33 const BrowserPermissionCallback& callback) { |
33 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 34 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
34 | 35 |
35 bool permission_set; | 36 bool permission_set; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 | 85 |
85 if (allowed) { | 86 if (allowed) { |
86 content::GeolocationProvider::GetInstance() | 87 content::GeolocationProvider::GetInstance() |
87 ->UserDidOptIntoLocationServices(); | 88 ->UserDidOptIntoLocationServices(); |
88 } | 89 } |
89 } | 90 } |
90 | 91 |
91 bool GeolocationPermissionContext::IsRestrictedToSecureOrigins() const { | 92 bool GeolocationPermissionContext::IsRestrictedToSecureOrigins() const { |
92 return false; | 93 return false; |
93 } | 94 } |
OLD | NEW |