OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/common/content_export.h" |
11 | 12 |
12 class GURL; | 13 class GURL; |
13 | 14 |
14 // GeolocationPermissionContext must be implemented by the embedder, to provide | 15 // GeolocationPermissionContext must be implemented by the embedder, to provide |
15 // the policy and logic for the Geolocation permissions flow. | 16 // the policy and logic for the Geolocation permissions flow. |
16 // This includes both prompting the user and persisting results, as required. | 17 // This includes both prompting the user and persisting results, as required. |
17 class GeolocationPermissionContext | 18 class CONTENT_EXPORT GeolocationPermissionContext |
18 : public base::RefCountedThreadSafe<GeolocationPermissionContext> { | 19 : public base::RefCountedThreadSafe<GeolocationPermissionContext> { |
19 public: | 20 public: |
20 // The renderer is requesting permission to use Geolocation. | 21 // The renderer is requesting permission to use Geolocation. |
21 // When the answer to a permission request has been determined, the result | 22 // When the answer to a permission request has been determined, the result |
22 // should be forwarded to the renderer via SetGeolocationPermissionResponse(). | 23 // should be forwarded to the renderer via SetGeolocationPermissionResponse(). |
23 virtual void RequestGeolocationPermission(int render_process_id, | 24 virtual void RequestGeolocationPermission(int render_process_id, |
24 int render_view_id, | 25 int render_view_id, |
25 int bridge_id, | 26 int bridge_id, |
26 const GURL& requesting_frame) = 0; | 27 const GURL& requesting_frame) = 0; |
27 | 28 |
(...skipping 14 matching lines...) Expand all Loading... |
42 GeolocationPermissionContext(); | 43 GeolocationPermissionContext(); |
43 virtual ~GeolocationPermissionContext(); | 44 virtual ~GeolocationPermissionContext(); |
44 | 45 |
45 private: | 46 private: |
46 friend class base::RefCountedThreadSafe<GeolocationPermissionContext>; | 47 friend class base::RefCountedThreadSafe<GeolocationPermissionContext>; |
47 | 48 |
48 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContext); | 49 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContext); |
49 }; | 50 }; |
50 | 51 |
51 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ | 52 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ |
OLD | NEW |