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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_android.h

Issue 2612993002: Make geolocation API and X-Geo header access consistent (Closed)
Patch Set: Fix test / merge error Created 3 years, 11 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 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 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
7 7
8 // The flow for geolocation permissions on Android needs to take into account 8 // The flow for geolocation permissions on Android needs to take into account
9 // the global geolocation settings so it differs from the desktop one. It 9 // the global geolocation settings so it differs from the desktop one. It
10 // works as follows. 10 // works as follows.
(...skipping 26 matching lines...) Expand all
37 class LocationSettings; 37 class LocationSettings;
38 class GURL; 38 class GURL;
39 class PermissionRequestID; 39 class PermissionRequestID;
40 40
41 class GeolocationPermissionContextAndroid 41 class GeolocationPermissionContextAndroid
42 : public GeolocationPermissionContext { 42 : public GeolocationPermissionContext {
43 public: 43 public:
44 explicit GeolocationPermissionContextAndroid(Profile* profile); 44 explicit GeolocationPermissionContextAndroid(Profile* profile);
45 ~GeolocationPermissionContextAndroid() override; 45 ~GeolocationPermissionContextAndroid() override;
46 46
47 protected:
48 // GeolocationPermissionContext:
49 ContentSetting GetPermissionStatusInternal(
50 const GURL& requesting_origin,
51 const GURL& embedding_origin) const override;
52
47 private: 53 private:
48 friend class GeolocationPermissionContextTests; 54 friend class GeolocationPermissionContextTests;
49 55
50 // GeolocationPermissionContext: 56 // GeolocationPermissionContext:
51 void RequestPermission( 57 void RequestPermission(
52 content::WebContents* web_contents, 58 content::WebContents* web_contents,
53 const PermissionRequestID& id, 59 const PermissionRequestID& id,
54 const GURL& requesting_frame_origin, 60 const GURL& requesting_frame_origin,
55 bool user_gesture, 61 bool user_gesture,
56 const BrowserPermissionCallback& callback) override; 62 const BrowserPermissionCallback& callback) override;
(...skipping 17 matching lines...) Expand all
74 infobars::InfoBar* permission_update_infobar_; 80 infobars::InfoBar* permission_update_infobar_;
75 81
76 // Must be the last member, to ensure that it will be destroyed first, which 82 // Must be the last member, to ensure that it will be destroyed first, which
77 // will invalidate weak pointers. 83 // will invalidate weak pointers.
78 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_; 84 base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_;
79 85
80 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); 86 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid);
81 }; 87 };
82 88
83 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_ 89 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698