| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CON
TEXT_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CON
TEXT_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CON
TEXT_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CON
TEXT_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/geolocation_permission_context.h" | 8 #include "content/public/browser/geolocation_permission_context.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 // Browser plugin specific implementation of GeolocationPermissionContext. | 12 // Browser plugin specific implementation of GeolocationPermissionContext. |
| 13 // It manages Geolocation permissions flow for BrowserPluginGuest. When a guest | 13 // It manages Geolocation permissions flow for BrowserPluginGuest. When a guest |
| 14 // requests gelocation permission, it delegates the request to embedder though | 14 // requests gelocation permission, it delegates the request to embedder though |
| 15 // embedder's javascript api. | 15 // embedder's javascript api. |
| 16 // This runs on the I/O thread. We have to return to UI thread to talk to a | 16 // This runs on the I/O thread. We have to return to UI thread to talk to a |
| 17 // BrowserPluginGuest. | 17 // BrowserPluginGuest. |
| 18 class BrowserPluginGeolocationPermissionContext : | 18 class BrowserPluginGeolocationPermissionContext : |
| 19 public GeolocationPermissionContext { | 19 public GeolocationPermissionContext { |
| 20 public: | 20 public: |
| 21 BrowserPluginGeolocationPermissionContext(); | 21 BrowserPluginGeolocationPermissionContext(); |
| 22 | 22 |
| 23 // GeolocationPermissionContext implementation: | 23 // GeolocationPermissionContext implementation: |
| 24 virtual void RequestGeolocationPermission( | 24 virtual void RequestGeolocationPermission( |
| 25 int render_process_id, | 25 int render_process_id, |
| 26 int render_view_id, | 26 int render_view_id, |
| 27 int bridge_id, | 27 int bridge_id, |
| 28 const GURL& requesting_frame, | 28 const GURL& requesting_frame, |
| 29 bool user_gesture, |
| 29 base::Callback<void(bool)> callback) OVERRIDE; | 30 base::Callback<void(bool)> callback) OVERRIDE; |
| 30 virtual void CancelGeolocationPermissionRequest( | 31 virtual void CancelGeolocationPermissionRequest( |
| 31 int render_process_id, | 32 int render_process_id, |
| 32 int render_view_id, | 33 int render_view_id, |
| 33 int bridge_id, | 34 int bridge_id, |
| 34 const GURL& requesting_frame) OVERRIDE; | 35 const GURL& requesting_frame) OVERRIDE; |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 virtual ~BrowserPluginGeolocationPermissionContext(); | 38 virtual ~BrowserPluginGeolocationPermissionContext(); |
| 38 | 39 |
| 39 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGeolocationPermissionContext); | 40 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGeolocationPermissionContext); |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace content | 43 } // namespace content |
| 43 | 44 |
| 44 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_
CONTEXT_H_ | 45 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_
CONTEXT_H_ |
| OLD | NEW |