2013-03-14 17:48:17 +00:00
|
|
|
#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:
|
2013-07-31 18:08:45 +00:00
|
|
|
virtual void RequestMediaAccessPermission(content::WebContents*,
|
|
|
|
const content::MediaStreamRequest&,
|
|
|
|
const content::MediaResponseCallback&) OVERRIDE;
|
2013-05-22 20:08:40 +00:00
|
|
|
#if defined(OS_MACOSX)
|
2013-03-14 17:48:17 +00:00
|
|
|
virtual void HandleKeyboardEvent(content::WebContents*, const content::NativeWebKeyboardEvent&) OVERRIDE;
|
2013-05-22 20:08:40 +00:00
|
|
|
#endif
|
2013-03-14 17:48:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|