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 XWALK_RUNTIME_BROWSER_RUNTIME_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define XWALK_RUNTIME_BROWSER_RUNTIME_GEOLOCATION_PERMISSION_CONTEXT_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
19 class XWalkBrowserContext;
21 class RuntimeGeolocationPermissionContext
22 : public base::RefCountedThreadSafe<RuntimeGeolocationPermissionContext> {
24 // content::GeolocationPermissionContext implementation.
25 virtual void RequestGeolocationPermission(
26 content::WebContents* web_contents,
27 const GURL& requesting_frame,
28 base::Callback<void(bool)> result_callback,
29 base::Closure* cancel_callback);
32 virtual ~RuntimeGeolocationPermissionContext();
33 friend class base::RefCountedThreadSafe<RuntimeGeolocationPermissionContext>;
36 void RequestGeolocationPermissionOnUIThread(
37 content::WebContents* web_contents,
38 const GURL& requesting_frame,
39 base::Callback<void(bool)> result_callback,
40 base::Closure* cancel_callback);
45 #endif // XWALK_RUNTIME_BROWSER_RUNTIME_GEOLOCATION_PERMISSION_CONTEXT_H_