Update browser/media/* for Chrome 30
I took the latest versions of these files from chrome/browser/media, then pared them down to remove all Chrome-isms and uses of UI to prompt the user about allowing access to devices.
This commit is contained in:
parent
aa4f991659
commit
d1623535e8
4 changed files with 211 additions and 96 deletions
|
@ -5,6 +5,8 @@
|
|||
#ifndef BRIGHTRAY_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
|
||||
#define BRIGHTRAY_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
|
||||
namespace brightray {
|
||||
|
@ -16,18 +18,12 @@ class MediaStreamDevicesController {
|
|||
|
||||
virtual ~MediaStreamDevicesController();
|
||||
|
||||
// Public method to be called before creating the MediaStreamInfoBarDelegate.
|
||||
// This function will check the content settings exceptions and take the
|
||||
// corresponding action on exception which matches the request.
|
||||
bool TakeAction();
|
||||
|
||||
// Public methods to be called by MediaStreamInfoBarDelegate;
|
||||
bool has_audio() const { return microphone_requested_; }
|
||||
bool has_video() const { return webcam_requested_; }
|
||||
private:
|
||||
void Accept();
|
||||
void Deny();
|
||||
|
||||
private:
|
||||
// The original request for access to devices.
|
||||
const content::MediaStreamRequest request_;
|
||||
|
||||
|
@ -41,6 +37,6 @@ class MediaStreamDevicesController {
|
|||
DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
} // namespace brightray
|
||||
|
||||
#endif // BRIGHTRAY_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue