Add BrowserWindow.showDefinitionForSelection()

This API shows the system-provided pop-up dictionary.
Some Mac apps including Chrome have "Look Up in in Dictionary" context
menu item. This API can be used to implement it.
This commit is contained in:
Hajime Morrita 2014-12-18 15:40:35 -08:00
parent 47d7a355f2
commit dc9329ff43
7 changed files with 38 additions and 0 deletions

View file

@ -161,6 +161,9 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
// Print current page.
virtual void Print(bool silent, bool print_background);
// Show popup dictionary.
virtual void ShowDefinitionForSelection();
// Toggle the menu bar.
virtual void SetAutoHideMenuBar(bool auto_hide);
virtual bool IsMenuBarAutoHide();