[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / android_webview / native / permission / media_access_permission_request.h
blob01bc83e471d5ced6a816c743c6dac9e1568f23c8
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_MEDIA_ACCESS_PERMISSION_REQUEST_H
6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_MEDIA_ACCESS_PERMISSION_REQUEST_H
8 #include "android_webview/native/permission/aw_permission_request_delegate.h"
9 #include "base/callback.h"
10 #include "content/public/common/media_stream_request.h"
12 namespace android_webview {
14 // The AwPermissionRequestDelegate implementation for media access permission
15 // request.
16 class MediaAccessPermissionRequest : public AwPermissionRequestDelegate {
17 public:
18 MediaAccessPermissionRequest(const content::MediaStreamRequest& request,
19 const content::MediaResponseCallback& callback);
20 ~MediaAccessPermissionRequest() override;
22 // AwPermissionRequestDelegate implementation.
23 const GURL& GetOrigin() override;
24 int64 GetResources() override;
25 void NotifyRequestResult(bool allowed) override;
27 private:
28 friend class TestMediaAccessPermissionRequest;
30 const content::MediaStreamRequest request_;
31 const content::MediaResponseCallback callback_;
33 // For test only.
34 content::MediaStreamDevices audio_test_devices_;
35 content::MediaStreamDevices video_test_devices_;
37 DISALLOW_COPY_AND_ASSIGN(MediaAccessPermissionRequest);
40 } // namespace android_webview
42 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_MEDIA_ACCESS_PERMISSION_REQUEST_H