Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit d84f9e4

Browse files
committed
Fixed documentation inside source files
1 parent d5038f5 commit d84f9e4

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

appshell/appshell_extensions.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,8 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
134134
browser,
135135
response);
136136

137-
// On MAC, beginModalSheet is going
138-
// to inform us asynchronusly. So here return from here
139-
// and delay sending the response until later.
137+
// Skip standard callback handling. ShowOpenDialog fires the
138+
// callback asynchronously.
140139

141140
return true;
142141
#else
@@ -172,10 +171,8 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
172171
ExtensionString proposedNewFilename = argList->GetString(3);
173172

174173
#ifdef OS_MACOSX
175-
// ShowSaveDialog itself is going to
176-
// take of communicating with the
177-
// render process.
178-
174+
// Skip standard callback handling. ShowSaveDialog fires the
175+
// callback asynchronously.
179176
ShowSaveDialog(title,
180177
initialPath,
181178
proposedNewFilename,

appshell/appshell_extensions_mac.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ void ShowOpenDialog(bool allowMulitpleSelection,
409409

410410
[openPanel setAllowedFileTypes:allowedFileTypes];
411411

412-
// cache the browser details, so has to access
413-
// the same inside the completionHandler block.
412+
// cache the browser and response variables, so that these
413+
// can be accessed from within the completionHandler block.
414414
CefRefPtr<CefBrowser> _browser = browser;
415415
CefRefPtr<CefProcessMessage> _response = response;
416416

@@ -451,8 +451,8 @@ void ShowSaveDialog(ExtensionString title,
451451

452452
[savePanel setNameFieldStringValue:[NSString stringWithUTF8String:proposedNewFilename.c_str()]];
453453

454-
// cache the browser details, so has to access
455-
// the same inside the completionHandler block.
454+
// cache the browser and response variables, so that these
455+
// can be accessed from within the completionHandler block.
456456
CefRefPtr<CefBrowser> _browser = browser;
457457
CefRefPtr<CefProcessMessage> _response = response;
458458

appshell/client_handler_mac.mm

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@
6161
if ([window styleMask] & NSFullScreenWindowMask) {
6262
[window setTitle:str];
6363
}
64-
65-
// This is required as we are now managing the window title
66-
// on our own, because of which the window title entires
67-
// are not getting added to 'Windows' menu. This is an
68-
// an official API.
64+
// This is required as we are now managing the window's title
65+
// on our own, using CustomTitlbeBarView. As we are nuking the
66+
// window's title, currently open windows like new brackets
67+
// windows/dev tools are not getting listed under the
68+
// 'Window' menu. So we are now explicitly telling OS to make
69+
// sure we have a menu entry under 'Window' menu. This is a
70+
// safe call and is officially supported.
6971
[NSApp changeWindowsItem:window title:str filename:NO];
7072

7173
[delegate performSelectorOnMainThread:@selector(windowTitleDidChange:) withObject:str waitUntilDone:NO];

0 commit comments

Comments
 (0)