Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Side by Side Diff: android_webview/native/aw_geolocation_permission_context.h

Issue 12211047: Implementing geolocation for the Android Webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added const Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
7 7
8 #include "base/callback_forward.h"
9 #include "content/public/browser/geolocation_permission_context.h" 8 #include "content/public/browser/geolocation_permission_context.h"
10 9
11 class GURL; 10 class GURL;
12 11
13 namespace android_webview { 12 namespace android_webview {
14 13
15 class AwGeolocationPermissionContext : 14 class AwGeolocationPermissionContext :
16 public content::GeolocationPermissionContext { 15 public content::GeolocationPermissionContext {
17 public: 16 public:
18 static content::GeolocationPermissionContext* Create(); 17 static content::GeolocationPermissionContext* Create();
19 18
20 // content::GeolocationPermissionContext implementation 19 // content::GeolocationPermissionContext implementation
21 virtual void RequestGeolocationPermission( 20 virtual void RequestGeolocationPermission(
22 int render_process_id, 21 int render_process_id,
23 int render_view_id, 22 int render_view_id,
24 int bridge_id, 23 int bridge_id,
25 const GURL& requesting_frame, 24 const GURL& requesting_frame,
26 base::Callback<void(bool)> callback) OVERRIDE; 25 base::Callback<void(bool)> callback) OVERRIDE;
27 virtual void CancelGeolocationPermissionRequest( 26 virtual void CancelGeolocationPermissionRequest(
28 int render_process_id, 27 int render_process_id,
29 int render_view_id, 28 int render_view_id,
30 int bridge_id, 29 int bridge_id,
31 const GURL& requesting_frame) OVERRIDE; 30 const GURL& requesting_frame) OVERRIDE;
32 31
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: 32 protected:
41 virtual ~AwGeolocationPermissionContext(); 33 virtual ~AwGeolocationPermissionContext();
42 34
43 private: 35 private:
44 void RequestGeolocationPermissionOnUIThread( 36 void RequestGeolocationPermissionOnUIThread(
45 int render_process_id, 37 int render_process_id,
46 int render_view_id, 38 int render_view_id,
47 int bridge_id, 39 int bridge_id,
48 const GURL& requesting_frame, 40 const GURL& requesting_frame,
49 base::Callback<void(bool)> callback); 41 base::Callback<void(bool)> callback);
50 42
51 void CancelGeolocationPermissionRequestOnUIThread( 43 void CancelGeolocationPermissionRequestOnUIThread(
52 int render_process_id, 44 int render_process_id,
53 int render_view_id, 45 int render_view_id,
54 int bridge_id, 46 int bridge_id,
55 const GURL& requesting_frame); 47 const GURL& requesting_frame);
56 }; 48 };
57 49
58 } // namespace android_webview 50 } // namespace android_webview
59 51
60 #endif // ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ 52 #endif // ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | android_webview/native/aw_geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698