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:
parent
47d7a355f2
commit
dc9329ff43
7 changed files with 38 additions and 0 deletions
|
@ -7,6 +7,9 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "atom/browser/native_window.h"
|
||||
|
@ -68,6 +71,7 @@ class NativeWindowMac : public NativeWindow {
|
|||
virtual bool HasModalDialog() OVERRIDE;
|
||||
virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
|
||||
virtual void SetProgressBar(double progress) OVERRIDE;
|
||||
virtual void ShowDefinitionForSelection() OVERRIDE;
|
||||
|
||||
// Returns true if |point| in local Cocoa coordinate system falls within
|
||||
// the draggable region.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue