[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / android_webview / native / permission / simple_permission_request.h
blobba6b8708253724f5875a8ba2cd766cce6ddd9865
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_NATIVE_PERMISSION_SIMPLE_PERMISSION_REQUEST_H
6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_SIMPLE_PERMISSION_REQUEST_H
8 #include "android_webview/native/permission/aw_permission_request_delegate.h"
9 #include "base/callback.h"
11 namespace android_webview {
13 // The class is used to handle the simple permission request which just needs
14 // a callback with bool parameter to indicate the permission granted or not.
15 class SimplePermissionRequest : public AwPermissionRequestDelegate {
16 public:
17 SimplePermissionRequest(const GURL& origin,
18 int64 resources,
19 const base::Callback<void(bool)>& callback);
20 ~SimplePermissionRequest() override;
22 // AwPermissionRequestDelegate implementation.
23 const GURL& GetOrigin() override;
24 int64 GetResources() override;
25 void NotifyRequestResult(bool allowed) override;
27 private:
28 const GURL origin_;
29 int64 resources_;
30 const base::Callback<void(bool)> callback_;
32 DISALLOW_COPY_AND_ASSIGN(SimplePermissionRequest);
35 } // namespace android_webview
37 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_PROTECTED_MEDIA_ID_PERMISSION_REQUEST_H