electron/brightray/browser/default_web_contents_delegate.h
Adam Roben 2595335045 Enable navigator.webkitGetUserMedia()
The code came from chrome/browser/media, but was simplified to remove
dependencies on other parts of chrome/ and to always allow the media stream
request.
2013-07-31 11:08:45 -07:00

26 lines
885 B
C++

#ifndef BRIGHTRAY_BROWSER_DEFAULT_WEB_CONTENTS_DELEGATE_H_
#define BRIGHTRAY_BROWSER_DEFAULT_WEB_CONTENTS_DELEGATE_H_
#include "content/public/browser/web_contents_delegate.h"
namespace brightray {
// This class provides some sane default behaviors to any content::WebContents instance (e.g.,
// keyboard shortcut handling on Mac).
class DefaultWebContentsDelegate : public content::WebContentsDelegate {
public:
DefaultWebContentsDelegate();
~DefaultWebContentsDelegate();
protected:
virtual void RequestMediaAccessPermission(content::WebContents*,
const content::MediaStreamRequest&,
const content::MediaResponseCallback&) OVERRIDE;
#if defined(OS_MACOSX)
virtual void HandleKeyboardEvent(content::WebContents*, const content::NativeWebKeyboardEvent&) OVERRIDE;
#endif
};
}
#endif