electron/brightray/browser/default_web_contents_delegate.h

29 lines
849 B
C
Raw Normal View History

#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&,
2014-10-23 03:10:39 +00:00
const content::MediaResponseCallback&) override;
#if defined(OS_MACOSX)
virtual void HandleKeyboardEvent(
2014-10-23 03:10:39 +00:00
content::WebContents*, const content::NativeWebKeyboardEvent&) override;
#endif
};
} // namespace brightray
#endif