Chromium Code Reviews| Index: chrome/browser/media/media_access_handler.h |
| diff --git a/chrome/browser/media/media_access_handler.h b/chrome/browser/media/media_access_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e28195bb36152ad9c975673904e694025f8439be |
| --- /dev/null |
| +++ b/chrome/browser/media/media_access_handler.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ |
| +#define CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ |
| + |
| +#include "base/callback.h" |
| +#include "content/public/browser/media_request_state.h" |
| +#include "content/public/common/media_stream_request.h" |
| + |
| +namespace content { |
| +class WebContents; |
| +} |
| + |
| +namespace extensions { |
| +class Extension; |
| +} |
| + |
| +// Interface for handling media access requests that are propagated from |
| +// MediaCaptureDevicesDispatcher. |
| +class MediaAccessHandler { |
| + public: |
| + MediaAccessHandler() {} |
| + virtual ~MediaAccessHandler() {} |
| + |
| + 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.
|
| + const extensions::Extension* extension) = 0; |
| + virtual bool CheckMediaAccessPermission( |
| + content::WebContents* web_contents, |
| + const GURL& security_origin, |
| + content::MediaStreamType type, |
| + const extensions::Extension* extension) = 0; |
| + virtual void HandleRequest(content::WebContents* web_contents, |
| + const content::MediaStreamRequest& request, |
| + const content::MediaResponseCallback& callback, |
| + const extensions::Extension* extension) = 0; |
| + virtual void UpdateMediaRequest(int render_process_id, |
|
Sergey Ulanov
2015/06/01 23:39:17
call it UpdateMediaRequestState()?
|
| + int render_frame_id, |
| + int page_request_id, |
| + content::MediaStreamType stream_type, |
| + content::MediaRequestState state) {} |
| +}; |
| + |
| +#endif // CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_ |