OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef ANDROID_WEBVIEW_NATIVE_PERMISSION_MEDIA_ACCESS_PERMISSION_REQUEST_H | |
6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_MEDIA_ACCESS_PERMISSION_REQUEST_H | |
7 | |
8 #include "android_webview/native/permission/aw_permission_request_delegate.h" | |
9 #include "content/public/common/media_stream_request.h" | |
10 | |
11 namespace android_webview { | |
12 | |
13 // The AwPermissionRequestDelegate implementation for media access permission | |
14 // request. | |
15 class MediaAccessPermissionRequest : public AwPermissionRequestDelegate { | |
mkosiba (inactive)
2014/04/17 10:34:06
same here, you should be able to easily add a c++
michaelbai
2014/04/22 20:53:51
Actually, it is not easy to write a unit test when
| |
16 public: | |
17 MediaAccessPermissionRequest(const content::MediaStreamRequest& request, | |
18 const content::MediaResponseCallback& callback); | |
19 virtual ~MediaAccessPermissionRequest(); | |
20 | |
21 // AwPermissionRequestDelegate implementation. | |
22 virtual const GURL& GetOrigin() OVERRIDE; | |
23 virtual int64 GetResources() OVERRIDE; | |
24 virtual void OnRequestResult(bool allowed) OVERRIDE; | |
25 | |
26 private: | |
27 const content::MediaStreamRequest request_; | |
benm (inactive)
2014/04/16 14:51:10
nit: did you mean for these to be const?
michaelbai
2014/04/22 20:53:51
Yes, I want it to be const
On 2014/04/16 14:51:10
| |
28 const content::MediaResponseCallback callback_; | |
29 | |
30 DISALLOW_COPY_AND_ASSIGN(MediaAccessPermissionRequest); | |
31 }; | |
32 | |
33 } // namespace android_webview | |
34 | |
35 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_MEDIA_ACCESS_PERMISSION_REQUEST_H | |
OLD | NEW |