1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
#define ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
#include "content/public/browser/geolocation_permission_context.h"
class GURL;
namespace android_webview {
class AwBrowserContext;
class AwGeolocationPermissionContext :
public content::GeolocationPermissionContext {
public:
static content::GeolocationPermissionContext* Create(
AwBrowserContext* browser_context);
// content::GeolocationPermissionContext implementation
virtual void RequestGeolocationPermission(
int render_process_id,
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
base::Callback<void(bool)> callback) OVERRIDE;
virtual void CancelGeolocationPermissionRequest(
int render_process_id,
int render_view_id,
int bridge_id,
const GURL& requesting_frame) OVERRIDE;
protected:
virtual ~AwGeolocationPermissionContext();
private:
void RequestGeolocationPermissionOnUIThread(
int render_process_id,
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
base::Callback<void(bool)> callback);
void CancelGeolocationPermissionRequestOnUIThread(
int render_process_id,
int render_view_id,
int bridge_id,
const GURL& requesting_frame);
};
} // namespace android_webview
#endif // ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
|