Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "content/public/browser/media_request_state.h" | |
| 10 #include "content/public/common/media_stream_request.h" | |
| 11 | |
| 12 namespace content { | |
| 13 class WebContents; | |
| 14 } | |
| 15 | |
| 16 namespace extensions { | |
| 17 class Extension; | |
| 18 } | |
| 19 | |
| 20 // Interface for handling media access requests that are propagated from | |
| 21 // MediaCaptureDevicesDispatcher. | |
| 22 class MediaAccessHandler { | |
| 23 public: | |
| 24 MediaAccessHandler() {} | |
| 25 virtual ~MediaAccessHandler() {} | |
| 26 | |
| 27 virtual bool SupportsStreamType(const content::MediaStreamType type, | |
|
Sergey Ulanov
2015/06/01 23:39:17
add a short comment for each method to describe it
changbin
2015/06/02 14:20:09
Done.
| |
| 28 const extensions::Extension* extension) = 0; | |
| 29 virtual bool CheckMediaAccessPermission( | |
| 30 content::WebContents* web_contents, | |
| 31 const GURL& security_origin, | |
| 32 content::MediaStreamType type, | |
| 33 const extensions::Extension* extension) = 0; | |
| 34 virtual void HandleRequest(content::WebContents* web_contents, | |
| 35 const content::MediaStreamRequest& request, | |
| 36 const content::MediaResponseCallback& callback, | |
| 37 const extensions::Extension* extension) = 0; | |
| 38 virtual void UpdateMediaRequest(int render_process_id, | |
|
Sergey Ulanov
2015/06/01 23:39:17
call it UpdateMediaRequestState()?
| |
| 39 int render_frame_id, | |
| 40 int page_request_id, | |
| 41 content::MediaStreamType stream_type, | |
| 42 content::MediaRequestState state) {} | |
| 43 }; | |
| 44 | |
| 45 #endif // CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ | |
| OLD | NEW |