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

Side by Side Diff: chrome/browser/ui/cocoa/js_modal_dialog_cocoa.mm

Issue 10105030: TabContents -> WebContentsImpl, part 21. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
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 "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"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // If the user wants to stay on this page, stop quitting (if a quit is in 69 // If the user wants to stay on this page, stop quitting (if a quit is in
70 // progress). 70 // progress).
71 if (native_dialog->dialog()->is_before_unload_dialog()) 71 if (native_dialog->dialog()->is_before_unload_dialog())
72 chrome_browser_application_mac::CancelTerminate(); 72 chrome_browser_application_mac::CancelTerminate();
73 native_dialog->dialog()->OnCancel(shouldSuppress); 73 native_dialog->dialog()->OnCancel(shouldSuppress);
74 break; 74 break;
75 } 75 }
76 case NSRunStoppedResponse: { // Window was closed underneath us 76 case NSRunStoppedResponse: { // Window was closed underneath us
77 // Need to call OnCancel() because there is some cleanup that needs 77 // Need to call OnCancel() because there is some cleanup that needs
78 // to be done. It won't call back to the javascript since the 78 // to be done. It won't call back to the javascript since the
79 // JavaScriptAppModalDialog knows that the TabContents was destroyed. 79 // JavaScriptAppModalDialog knows that the WebContents was destroyed.
80 native_dialog->dialog()->OnCancel(shouldSuppress); 80 native_dialog->dialog()->OnCancel(shouldSuppress);
81 break; 81 break;
82 } 82 }
83 default: { 83 default: {
84 NOTREACHED(); 84 NOTREACHED();
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 @end 89 @end
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 //////////////////////////////////////////////////////////////////////////////// 214 ////////////////////////////////////////////////////////////////////////////////
215 // NativeAppModalDialog, public: 215 // NativeAppModalDialog, public:
216 216
217 // static 217 // static
218 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 218 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
219 JavaScriptAppModalDialog* dialog, 219 JavaScriptAppModalDialog* dialog,
220 gfx::NativeWindow parent_window) { 220 gfx::NativeWindow parent_window) {
221 return new JSModalDialogCocoa(dialog); 221 return new JSModalDialogCocoa(dialog);
222 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698