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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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/bind.h" 7 #include "base/bind.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 12 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
13 #include "chrome/browser/ui/chrome_style.h" 13 #include "chrome/browser/ui/chrome_style.h"
14 #include "chrome/browser/ui/chrome_style.h" 14 #include "chrome/browser/ui/chrome_style.h"
15 #include "chrome/browser/ui/chrome_style.h" 15 #include "chrome/browser/ui/chrome_style.h"
16 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h" 16 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h"
17 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h" 17 #import "chrome/browser/ui/cocoa/autofill/autofill_details_container.h"
18 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" 18 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
19 #import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h" 19 #import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h"
20 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" 20 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
21 #import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h" 21 #import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h"
22 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h" 22 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
23 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 23 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
24 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h" 24 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi ndow.h"
25 #include "content/public/browser/web_contents.h" 25 #include "content/public/browser/web_contents.h"
26 #include "content/public/browser/web_contents_view.h" 26 #include "content/public/browser/web_contents_view.h"
27 #import "ui/base/cocoa/flipped_view.h" 27 #import "ui/base/cocoa/flipped_view.h"
28 #include "ui/base/cocoa/window_size_constants.h" 28 #include "ui/base/cocoa/window_size_constants.h"
29 29
30 namespace { 30 namespace {
31 31
32 const CGFloat kAccountChooserHeight = 20.0; 32 const CGFloat kAccountChooserHeight = 20.0;
33 const CGFloat kRelatedControlVerticalSpacing = 8.0; 33 const CGFloat kRelatedControlVerticalSpacing = 8.0;
34 34
35 } // namespace; 35 } // namespace;
36 36
37 namespace autofill { 37 namespace autofill {
38 38
39 // static 39 // static
40 AutofillDialogView* AutofillDialogView::Create( 40 AutofillDialogView* AutofillDialogView::Create(
41 AutofillDialogController* controller) { 41 AutofillDialogViewDelegate* controller) {
42 return new AutofillDialogCocoa(controller); 42 return new AutofillDialogCocoa(controller);
43 } 43 }
44 44
45 AutofillDialogCocoa::AutofillDialogCocoa(AutofillDialogController* controller) 45 AutofillDialogCocoa::AutofillDialogCocoa(AutofillDialogViewDelegate* controller)
46 : close_weak_ptr_factory_(this), 46 : close_weak_ptr_factory_(this),
47 controller_(controller) { 47 controller_(controller) {
48 } 48 }
49 49
50 AutofillDialogCocoa::~AutofillDialogCocoa() { 50 AutofillDialogCocoa::~AutofillDialogCocoa() {
51 } 51 }
52 52
53 void AutofillDialogCocoa::Show() { 53 void AutofillDialogCocoa::Show() {
54 // This should only be called once. 54 // This should only be called once.
55 DCHECK(!sheet_controller_.get()); 55 DCHECK(!sheet_controller_.get());
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 - (void)activateFieldForInput:(const autofill::DetailInput&)input { 424 - (void)activateFieldForInput:(const autofill::DetailInput&)input {
425 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { 425 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
426 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); 426 autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
427 [[mainContainer_ sectionForId:section] activateFieldForInput:input]; 427 [[mainContainer_ sectionForId:section] activateFieldForInput:input];
428 } 428 }
429 } 429 }
430 430
431 @end 431 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698