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

Side by Side Diff: content/shell/shell_javascript_dialog_mac.mm

Issue 10824077: Content shell/GTK: Add JavaScript dialog support. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Supress the uninitailized buttons Created 8 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_javascript_dialog.h" 5 #include "content/shell/shell_javascript_dialog.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 [NSApp endSheet:[alert_ window]]; 80 [NSApp endSheet:[alert_ window]];
81 alert_.reset(); 81 alert_.reset();
82 } 82 }
83 83
84 @end 84 @end
85 85
86 namespace content { 86 namespace content {
87 87
88 ShellJavaScriptDialog::ShellJavaScriptDialog( 88 ShellJavaScriptDialog::ShellJavaScriptDialog(
89 ShellJavaScriptDialogCreator* creator, 89 ShellJavaScriptDialogCreator* creator,
90 gfx::NativeWindow parent_window,
90 JavaScriptMessageType message_type, 91 JavaScriptMessageType message_type,
91 const string16& message_text, 92 const string16& message_text,
92 const string16& default_prompt_text, 93 const string16& default_prompt_text,
93 const JavaScriptDialogCreator::DialogClosedCallback& callback) 94 const JavaScriptDialogCreator::DialogClosedCallback& callback)
94 : creator_(creator), 95 : creator_(creator),
95 callback_(callback) { 96 callback_(callback) {
96 bool text_field = message_type == JAVASCRIPT_MESSAGE_TYPE_PROMPT; 97 bool text_field = message_type == JAVASCRIPT_MESSAGE_TYPE_PROMPT;
97 bool one_button = message_type == JAVASCRIPT_MESSAGE_TYPE_ALERT; 98 bool one_button = message_type == JAVASCRIPT_MESSAGE_TYPE_ALERT;
98 99
99 helper_ = 100 helper_ =
(...skipping 28 matching lines...) Expand all
128 129
129 ShellJavaScriptDialog::~ShellJavaScriptDialog() { 130 ShellJavaScriptDialog::~ShellJavaScriptDialog() {
130 [helper_ release]; 131 [helper_ release];
131 } 132 }
132 133
133 void ShellJavaScriptDialog::Cancel() { 134 void ShellJavaScriptDialog::Cancel() {
134 [helper_ cancel]; 135 [helper_ cancel];
135 } 136 }
136 137
137 } // namespace content 138 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_javascript_dialog_gtk.cc ('k') | content/shell/shell_javascript_dialog_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698