• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_
7 
8 #include "content/public/browser/geolocation_permission_context.h"
9 
10 namespace content {
11 
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 {
20  public:
21   BrowserPluginGeolocationPermissionContext();
22 
23   // GeolocationPermissionContext implementation:
24   virtual void RequestGeolocationPermission(
25       int render_process_id,
26       int render_view_id,
27       int bridge_id,
28       const GURL& requesting_frame,
29       base::Callback<void(bool)> callback) OVERRIDE;
30   virtual void CancelGeolocationPermissionRequest(
31       int render_process_id,
32       int render_view_id,
33       int bridge_id,
34       const GURL& requesting_frame) OVERRIDE;
35 
36  private:
37   virtual ~BrowserPluginGeolocationPermissionContext();
38 
39   DISALLOW_COPY_AND_ASSIGN(BrowserPluginGeolocationPermissionContext);
40 };
41 
42 }  // namespace content
43 
44 #endif  // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GEOLOCATION_PERMISSION_CONTEXT_H_
45