OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 #include "content/public/browser/geolocation_permission_context.h" |
| 10 |
| 11 class GURL; |
| 12 |
| 13 namespace android_webview { |
| 14 |
| 15 class AwGeolocationPermissionContext : |
| 16 public content::GeolocationPermissionContext { |
| 17 public: |
| 18 static content::GeolocationPermissionContext* Create(); |
| 19 |
| 20 // content::GeolocationPermissionContext implementation |
| 21 virtual void RequestGeolocationPermission( |
| 22 int render_process_id, |
| 23 int render_view_id, |
| 24 int bridge_id, |
| 25 const GURL& requesting_frame, |
| 26 base::Callback<void(bool)> callback) OVERRIDE; |
| 27 virtual void CancelGeolocationPermissionRequest( |
| 28 int render_process_id, |
| 29 int render_view_id, |
| 30 int bridge_id, |
| 31 const GURL& requesting_frame) OVERRIDE; |
| 32 |
| 33 void InvokeCallback( |
| 34 int render_process_id, |
| 35 int render_view_id, |
| 36 int bridge_id, |
| 37 const GURL& requesting_frame, |
| 38 bool value); |
| 39 |
| 40 protected: |
| 41 virtual ~AwGeolocationPermissionContext(); |
| 42 |
| 43 private: |
| 44 void RequestGeolocationPermissionOnUIThread( |
| 45 int render_process_id, |
| 46 int render_view_id, |
| 47 int bridge_id, |
| 48 const GURL& requesting_frame, |
| 49 base::Callback<void(bool)> callback); |
| 50 |
| 51 void CancelGeolocationPermissionRequestOnUIThread( |
| 52 int render_process_id, |
| 53 int render_view_id, |
| 54 int bridge_id, |
| 55 const GURL& requesting_frame); |
| 56 }; |
| 57 |
| 58 } // namespace android_webview |
| 59 |
| 60 #endif // ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ |
OLD | NEW |