electron/brightray/browser/default_web_contents_delegate.h
Adam Roben be6d990a97 Make keyboard shortcuts work on Mac
When the renderer doesn't handle a key event, we pass it off to the main menu
to see if it can handle it.

Part of #2.
2013-03-14 13:50:15 -04:00

21 lines
615 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 HandleKeyboardEvent(content::WebContents*, const content::NativeWebKeyboardEvent&) OVERRIDE;
};
}
#endif