OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ |
6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h" | |
11 #include "content/public/browser/geolocation_permission_context.h" | 12 #include "content/public/browser/geolocation_permission_context.h" |
12 | 13 |
13 class GeolocationInfoBarQueueController; | |
14 class PrefService; | |
15 class Profile; | 14 class Profile; |
16 | 15 |
17 // Chrome specific implementation of GeolocationPermissionContext; manages | 16 // Chrome specific implementation of GeolocationPermissionContext; manages |
18 // Geolocation permissions flow, and delegates UI handling via | 17 // Geolocation permissions flow, and delegates UI handling via |
19 // GeolocationInfoBarQueueController. | 18 // GeolocationInfoBarQueueController. |
20 class ChromeGeolocationPermissionContext | 19 class ChromeGeolocationPermissionContext |
21 : public content::GeolocationPermissionContext { | 20 : public content::GeolocationPermissionContext { |
21 | |
bulach
2012/10/22 13:01:03
nit: here and in a few classes below, please remov
Ramya
2012/10/22 20:58:04
Done.
| |
22 public: | 22 public: |
23 static ChromeGeolocationPermissionContext* Create(Profile* profile); | |
24 | |
25 static void RegisterUserPrefs(PrefService *user_prefs); | |
26 | |
27 // GeolocationPermissionContext implementation: | 23 // GeolocationPermissionContext implementation: |
28 virtual void RequestGeolocationPermission( | 24 virtual void RequestGeolocationPermission( |
29 int render_process_id, | 25 int render_process_id, |
30 int render_view_id, | 26 int render_view_id, |
31 int bridge_id, | 27 int bridge_id, |
32 const GURL& requesting_frame, | 28 const GURL& requesting_frame, |
33 base::Callback<void(bool)> callback) OVERRIDE; | 29 base::Callback<void(bool)> callback) OVERRIDE; |
34 virtual void CancelGeolocationPermissionRequest( | 30 virtual void CancelGeolocationPermissionRequest( |
35 int render_process_id, | 31 int render_process_id, |
36 int render_view_id, | 32 int render_view_id, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 // This must only be accessed from the UI thread. | 91 // This must only be accessed from the UI thread. |
96 Profile* const profile_; | 92 Profile* const profile_; |
97 | 93 |
98 scoped_ptr<GeolocationInfoBarQueueController> | 94 scoped_ptr<GeolocationInfoBarQueueController> |
99 geolocation_infobar_queue_controller_; | 95 geolocation_infobar_queue_controller_; |
100 | 96 |
101 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext); | 97 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext); |
102 }; | 98 }; |
103 | 99 |
104 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ | 100 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_ |
OLD | NEW |