| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/js_modal_dialog_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/js_modal_dialog_cocoa.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #import "base/mac/cocoa_protocols.h" | 10 #import "base/mac/cocoa_protocols.h" |
| 11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| 12 #import "chrome/browser/chrome_browser_application_mac.h" | 12 #import "chrome/browser/chrome_browser_application_mac.h" |
| 13 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" | 13 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" |
| 14 #include "grit/app_strings.h" | |
| 15 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 #include "grit/ui_strings.h" |
| 16 #include "ui/base/l10n/l10n_util_mac.h" | 16 #include "ui/base/l10n/l10n_util_mac.h" |
| 17 #include "ui/base/message_box_flags.h" | 17 #include "ui/base/message_box_flags.h" |
| 18 | 18 |
| 19 // Helper object that receives the notification that the dialog/sheet is | 19 // Helper object that receives the notification that the dialog/sheet is |
| 20 // going away. Is responsible for cleaning itself up. | 20 // going away. Is responsible for cleaning itself up. |
| 21 @interface JavaScriptAppModalDialogHelper : NSObject<NSAlertDelegate> { | 21 @interface JavaScriptAppModalDialogHelper : NSObject<NSAlertDelegate> { |
| 22 @private | 22 @private |
| 23 NSAlert* alert_; | 23 NSAlert* alert_; |
| 24 NSTextField* textField_; // WEAK; owned by alert_ | 24 NSTextField* textField_; // WEAK; owned by alert_ |
| 25 } | 25 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 //////////////////////////////////////////////////////////////////////////////// | 212 //////////////////////////////////////////////////////////////////////////////// |
| 213 // NativeAppModalDialog, public: | 213 // NativeAppModalDialog, public: |
| 214 | 214 |
| 215 // static | 215 // static |
| 216 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( | 216 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( |
| 217 JavaScriptAppModalDialog* dialog, | 217 JavaScriptAppModalDialog* dialog, |
| 218 gfx::NativeWindow parent_window) { | 218 gfx::NativeWindow parent_window) { |
| 219 return new JSModalDialogCocoa(dialog); | 219 return new JSModalDialogCocoa(dialog); |
| 220 } | 220 } |
| OLD | NEW |