Small style fixes

This commit is contained in:
Cheng Zhao 2014-12-19 12:48:53 -08:00
parent 598060dfd8
commit 6cdc8e4b96
3 changed files with 21 additions and 10 deletions

View file

@ -498,8 +498,8 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setMenuBarVisibility", &Window::SetMenuBarVisibility) .SetMethod("setMenuBarVisibility", &Window::SetMenuBarVisibility)
.SetMethod("isMenuBarVisible", &Window::IsMenuBarVisible) .SetMethod("isMenuBarVisible", &Window::IsMenuBarVisible)
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
.SetMethod( .SetMethod("showDefinitionForSelection",
"showDefinitionForSelection", &Window::ShowDefinitionForSelection) &Window::ShowDefinitionForSelection)
#endif #endif
.SetMethod("_getWebContents", &Window::GetWebContents) .SetMethod("_getWebContents", &Window::GetWebContents)
.SetMethod("_getDevToolsWebContents", &Window::GetDevToolsWebContents); .SetMethod("_getDevToolsWebContents", &Window::GetDevToolsWebContents);

View file

@ -644,6 +644,8 @@ void NativeWindowMac::SetProgressBar(double progress) {
void NativeWindowMac::ShowDefinitionForSelection() { void NativeWindowMac::ShowDefinitionForSelection() {
content::WebContents* web_contents = GetWebContents(); content::WebContents* web_contents = GetWebContents();
if (!web_contents)
return;
content::RenderWidgetHostView* rwhv = web_contents->GetRenderWidgetHostView(); content::RenderWidgetHostView* rwhv = web_contents->GetRenderWidgetHostView();
if (!rwhv) if (!rwhv)
return; return;

View file

@ -426,23 +426,31 @@ Returns whether the window is in kiosk mode.
* `filename` String * `filename` String
__OS X Only:__ Sets the pathname of the file the window represents, and the icon Sets the pathname of the file the window represents, and the icon of the file
of the file will show in window's title bar. will show in window's title bar.
__Note__: This API is available only on Mac OS X.
### BrowserWindow.getRepresentedFilename() ### BrowserWindow.getRepresentedFilename()
__OS X Only:__ Returns the pathname of the file the window represents. Returns the pathname of the file the window represents.
__Note__: This API is available only on Mac OS X.
### BrowserWindow.setDocumentEdited(edited) ### BrowserWindow.setDocumentEdited(edited)
* `edited` Boolean * `edited` Boolean
__OS X Only:__ Specifies whether the windows document has been edited, and the Specifies whether the windows document has been edited, and the icon in title
icon in titlebar will become grey when set to `true`. bar will become grey when set to `true`.
__Note__: This API is available only on Mac OS X.
### BrowserWindow.IsDocumentEdited() ### BrowserWindow.IsDocumentEdited()
__OS X Only:__ Whether the window's document has been edited. Whether the window's document has been edited.
__Note__: This API is available only on Mac OS X.
### BrowserWindow.openDevTools() ### BrowserWindow.openDevTools()
@ -532,8 +540,9 @@ it will assume `app.getName().desktop`.
### BrowserWindow.showDefinitionForSelection() ### BrowserWindow.showDefinitionForSelection()
Show pop-up dictionary that searches the selected word on the page. Shows pop-up dictionary that searches the selected word on the page.
This API is available only on Mac OS.
__Note__: This API is available only on Mac OS X.
### BrowserWindow.setAutoHideMenuBar(hide) ### BrowserWindow.setAutoHideMenuBar(hide)