views: Add support for accelerators (issue #2102)

This commit is contained in:
Marshall Greenblatt
2017-02-16 18:19:43 -05:00
parent e4867b5afb
commit bd1b80198f
35 changed files with 948 additions and 74 deletions

View File

@@ -83,6 +83,7 @@ class ViewsWindow : public CefBrowserViewDelegate,
bool canGoBack,
bool canGoForward);
void SetDraggableRegions(const std::vector<CefDraggableRegion>& regions);
void TakeFocus(bool next);
// CefBrowserViewDelegate methods:
bool OnPopupBrowserViewCreated(
@@ -111,6 +112,9 @@ class ViewsWindow : public CefBrowserViewDelegate,
void OnWindowDestroyed(CefRefPtr<CefWindow> window) OVERRIDE;
bool IsFrameless(CefRefPtr<CefWindow> window) OVERRIDE;
bool CanClose(CefRefPtr<CefWindow> window) OVERRIDE;
bool OnAccelerator(CefRefPtr<CefWindow> window, int command_id) OVERRIDE;
bool OnKeyEvent(CefRefPtr<CefWindow> window,
const CefKeyEvent& event) OVERRIDE;
// CefViewDelegate methods:
CefSize GetMinimumSize(CefRefPtr<CefView> view) override;
@@ -131,6 +135,9 @@ class ViewsWindow : public CefBrowserViewDelegate,
// Add controls to the Window.
void AddControls();
// Add keyboard accelerators to the Window.
void AddAccelerators();
// Enable or disable a view by |id|.
void EnableView(int id, bool enable);