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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_
8 #include "content/public/browser/geolocation_permission_context.h"
12 // Browser plugin specific implementation of GeolocationPermissionContext.
13 // It manages Geolocation permissions flow for BrowserPluginGuest. When a guest
14 // requests gelocation permission, it delegates the request to embedder though
15 // embedder's javascript api.
16 // This runs on the I/O thread. We have to return to UI thread to talk to a
17 // BrowserPluginGuest.
18 class BrowserPluginGeolocationPermissionContext :
19 public GeolocationPermissionContext {
21 BrowserPluginGeolocationPermissionContext();
23 // GeolocationPermissionContext implementation:
24 virtual void RequestGeolocationPermission(
25 int render_process_id,
28 const GURL& requesting_frame,
29 base::Callback<void(bool)> callback) OVERRIDE;
30 virtual void CancelGeolocationPermissionRequest(
31 int render_process_id,
34 const GURL& requesting_frame) OVERRIDE;
37 virtual ~BrowserPluginGeolocationPermissionContext();
39 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGeolocationPermissionContext);
42 } // namespace content
44 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_