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

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

Issue 273523007: Dispatch geolocation IPCs on the UI thread. Aside from simplifying the code to avoid a lot of threa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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 "content/public/browser/geolocation_permission_context.h" 8 #include "content/public/browser/geolocation_permission_context.h"
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace android_webview { 12 namespace android_webview {
13 13
14 class AwBrowserContext; 14 class AwBrowserContext;
15 15
16 class AwGeolocationPermissionContext : 16 class AwGeolocationPermissionContext :
17 public content::GeolocationPermissionContext { 17 public content::GeolocationPermissionContext {
18 public: 18 public:
19 static content::GeolocationPermissionContext* Create( 19 static content::GeolocationPermissionContext* Create(
20 AwBrowserContext* browser_context); 20 AwBrowserContext* browser_context);
21 21
22 // content::GeolocationPermissionContext implementation 22 // content::GeolocationPermissionContext implementation
23 virtual void RequestGeolocationPermission( 23 virtual void RequestGeolocationPermission(
24 int render_process_id, 24 content::WebContents* web_contents,
25 int render_view_id,
26 int bridge_id, 25 int bridge_id,
27 const GURL& requesting_frame, 26 const GURL& requesting_frame,
28 bool user_gesture, 27 bool user_gesture,
29 base::Callback<void(bool)> callback) OVERRIDE; 28 base::Callback<void(bool)> callback) OVERRIDE;
30 virtual void CancelGeolocationPermissionRequest( 29 virtual void CancelGeolocationPermissionRequest(
31 int render_process_id, 30 content::WebContents* web_contents,
32 int render_view_id,
33 int bridge_id, 31 int bridge_id,
34 const GURL& requesting_frame) OVERRIDE; 32 const GURL& requesting_frame) OVERRIDE;
35 33
36 protected: 34 protected:
37 virtual ~AwGeolocationPermissionContext(); 35 virtual ~AwGeolocationPermissionContext();
38 36
39 private: 37 private:
40 void RequestGeolocationPermissionOnUIThread(
41 int render_process_id,
42 int render_view_id,
43 int bridge_id,
44 const GURL& requesting_frame,
45 bool user_gesture,
46 base::Callback<void(bool)> callback);
47
48 void CancelGeolocationPermissionRequestOnUIThread(
49 int render_process_id,
50 int render_view_id,
51 int bridge_id,
52 const GURL& requesting_frame);
53 }; 38 };
54 39
55 } // namespace android_webview 40 } // namespace android_webview
56 41
57 #endif // ANDROID_WEBVIEW_NATIVE_AW_GEOLOCATION_PERMISSION_CONTEXT_H_ 42 #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