Fix dcheck in message port code on Mandoline shutdown.
[chromium-blink-merge.git] / android_webview / browser / aw_browser_permission_request_delegate.h
bloba0144a1cff2d27d25e8bed6111014300828cec90
1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_AW_BROWSER_PERMISSION_REQUEST_DELEGATE_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_PERMISSION_REQUEST_DELEGATE_H_
8 #include "base/callback_forward.h"
9 #include "url/gurl.h"
11 namespace android_webview {
13 // Delegate interface to handle the permission requests from |BrowserContext|.
14 class AwBrowserPermissionRequestDelegate {
15 public:
16 // Returns the AwBrowserPermissionRequestDelegate instance associated with
17 // the given render_process_id and render_frame_id, or NULL.
18 static AwBrowserPermissionRequestDelegate* FromID(int render_process_id,
19 int render_frame_id);
21 virtual void RequestProtectedMediaIdentifierPermission(
22 const GURL& origin,
23 const base::Callback<void(bool)>& callback) = 0;
25 virtual void CancelProtectedMediaIdentifierPermissionRequests(
26 const GURL& origin) = 0;
28 virtual void RequestGeolocationPermission(
29 const GURL& origin,
30 const base::Callback<void(bool)>& callback) = 0;
32 virtual void CancelGeolocationPermissionRequests(const GURL& origin) = 0;
34 virtual void RequestMIDISysexPermission(
35 const GURL& origin,
36 const base::Callback<void(bool)>& callback) = 0;
38 virtual void CancelMIDISysexPermissionRequests(const GURL& origin) = 0;
40 protected:
41 AwBrowserPermissionRequestDelegate() {}
44 } // namespace android_webview
45 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_PERMISSION_REQUEST_DELEGATE_H_