Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2270)

Unified Diff: content/shell/shell_javascript_dialog_mac.mm

Issue 9961013: Minor cleaning of shell javascript dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_javascript_dialog.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_javascript_dialog_mac.mm
diff --git a/content/shell/shell_javascript_dialog_mac.mm b/content/shell/shell_javascript_dialog_mac.mm
index 543bb558339a15970fee1e5da0003eb2453156c8..90ad82ed32c889a512ff90971073726cd364f5d5 100644
--- a/content/shell/shell_javascript_dialog_mac.mm
+++ b/content/shell/shell_javascript_dialog_mac.mm
@@ -104,29 +104,29 @@ ShellJavaScriptDialog::ShellJavaScriptDialog(
andCallback:callback];
// Show the modal dialog.
- alert_ = [helper_ alert];
+ NSAlert* alert = [helper_ alert];
NSTextField* field = nil;
if (text_field) {
field = [helper_ textField];
[field setStringValue:base::SysUTF16ToNSString(default_prompt_text)];
}
- [alert_ setDelegate:helper_];
- [alert_ setInformativeText:base::SysUTF16ToNSString(message_text)];
- [alert_ setMessageText:@"Javascript alert"];
- [alert_ addButtonWithTitle:@"OK"];
+ [alert setDelegate:helper_];
+ [alert setInformativeText:base::SysUTF16ToNSString(message_text)];
+ [alert setMessageText:@"Javascript alert"];
+ [alert addButtonWithTitle:@"OK"];
if (!one_button) {
- NSButton* other = [alert_ addButtonWithTitle:@"Cancel"];
+ NSButton* other = [alert addButtonWithTitle:@"Cancel"];
[other setKeyEquivalent:@"\e"];
}
- [alert_
+ [alert
beginSheetModalForWindow:nil // nil here makes it app-modal
modalDelegate:helper_
didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
contextInfo:this];
- if ([alert_ accessoryView])
- [[alert_ window] makeFirstResponder:[alert_ accessoryView]];
+ if ([alert accessoryView])
+ [[alert window] makeFirstResponder:[alert accessoryView]];
}
ShellJavaScriptDialog::~ShellJavaScriptDialog() {
« no previous file with comments | « content/shell/shell_javascript_dialog.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698