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: trunk/src/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm

Issue 21372006: Revert 212329 "Reland "Close web contents modal dialogs on conte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/autofill/autofill_dialog_cocoa.h" 5 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // This should only be called once. 51 // This should only be called once.
52 DCHECK(!sheet_controller_.get()); 52 DCHECK(!sheet_controller_.get());
53 sheet_controller_.reset([[AutofillDialogWindowController alloc] 53 sheet_controller_.reset([[AutofillDialogWindowController alloc]
54 initWithWebContents:controller_->web_contents() 54 initWithWebContents:controller_->web_contents()
55 autofillDialog:this]); 55 autofillDialog:this]);
56 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 56 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
57 [[CustomConstrainedWindowSheet alloc] 57 [[CustomConstrainedWindowSheet alloc]
58 initWithCustomWindow:[sheet_controller_ window]]); 58 initWithCustomWindow:[sheet_controller_ window]]);
59 constrained_window_.reset( 59 constrained_window_.reset(
60 new ConstrainedWindowMac(this, controller_->web_contents(), sheet)); 60 new ConstrainedWindowMac(this, controller_->web_contents(), sheet));
61 constrained_window_->SetPreventCloseOnLoadStart(true);
62 } 61 }
63 62
64 void AutofillDialogCocoa::Hide() { 63 void AutofillDialogCocoa::Hide() {
65 [sheet_controller_ hide]; 64 [sheet_controller_ hide];
66 } 65 }
67 66
68 // Closes the sheet and ends the modal loop. Triggers cleanup sequence. 67 // Closes the sheet and ends the modal loop. Triggers cleanup sequence.
69 void AutofillDialogCocoa::PerformClose() { 68 void AutofillDialogCocoa::PerformClose() {
70 constrained_window_->CloseWebContentsModalDialog(); 69 constrained_window_->CloseWebContentsModalDialog();
71 } 70 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 411 }
413 412
414 - (void)activateFieldForInput:(const autofill::DetailInput&)input { 413 - (void)activateFieldForInput:(const autofill::DetailInput&)input {
415 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { 414 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
416 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); 415 autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
417 [[mainContainer_ sectionForId:section] activateFieldForInput:input]; 416 [[mainContainer_ sectionForId:section] activateFieldForInput:input];
418 } 417 }
419 } 418 }
420 419
421 @end 420 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698