Re-enable index-basics-workers test to see if still times
[chromium-blink-merge.git] / content / public / browser / geolocation_permission_context.h
blobe1faa09a32a3b18f6c7f9239c9c68d536381b01e
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
12 class GURL;
14 namespace content {
16 // GeolocationPermissionContext must be implemented by the embedder, to provide
17 // the policy and logic for the Geolocation permissions flow.
18 // This includes both prompting the user and persisting results, as required.
19 class CONTENT_EXPORT GeolocationPermissionContext
20 : public base::RefCountedThreadSafe<GeolocationPermissionContext> {
21 public:
22 // The renderer is requesting permission to use Geolocation.
23 // When the answer to a permission request has been determined, |callback|
24 // should be called with the result.
25 virtual void RequestGeolocationPermission(
26 int render_process_id,
27 int render_view_id,
28 int bridge_id,
29 const GURL& requesting_frame,
30 base::Callback<void(bool)> callback) = 0;
32 // The renderer is cancelling a pending permission request.
33 virtual void CancelGeolocationPermissionRequest(
34 int render_process_id,
35 int render_view_id,
36 int bridge_id,
37 const GURL& requesting_frame) = 0;
39 protected:
40 virtual ~GeolocationPermissionContext() {}
42 private:
43 friend class base::RefCountedThreadSafe<GeolocationPermissionContext>;
46 } // namespace content
48 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_