Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / android_webview / native / permission / media_access_permission_request.h
blob1a4d482698e7cf613c71b6407e42191e5d796477
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 virtual ~MediaAccessPermissionRequest();
22 // AwPermissionRequestDelegate implementation.
23 virtual const GURL& GetOrigin() OVERRIDE;
24 virtual int64 GetResources() OVERRIDE;
25 virtual 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