OLD | NEW |
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" |
(...skipping 12 matching lines...) Expand all Loading... |
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 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 #import "ui/base/cocoa/flipped_view.h" | 28 #import "ui/base/cocoa/flipped_view.h" |
29 #include "ui/base/cocoa/window_size_constants.h" | 29 #include "ui/base/cocoa/window_size_constants.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "ui/gfx/platform_font.h" | 31 #include "ui/gfx/platform_font.h" |
32 | 32 |
33 namespace { | |
34 | |
35 const CGFloat kAccountChooserHeight = 20.0; | 33 const CGFloat kAccountChooserHeight = 20.0; |
36 const CGFloat kRelatedControlVerticalSpacing = 8.0; | |
37 | |
38 } // namespace; | |
39 | 34 |
40 namespace autofill { | 35 namespace autofill { |
41 | 36 |
42 // static | 37 // static |
43 AutofillDialogView* AutofillDialogView::Create( | 38 AutofillDialogView* AutofillDialogView::Create( |
44 AutofillDialogViewDelegate* delegate) { | 39 AutofillDialogViewDelegate* delegate) { |
45 return new AutofillDialogCocoa(delegate); | 40 return new AutofillDialogCocoa(delegate); |
46 } | 41 } |
47 | 42 |
48 AutofillDialogCocoa::AutofillDialogCocoa(AutofillDialogViewDelegate* delegate) | 43 AutofillDialogCocoa::AutofillDialogCocoa(AutofillDialogViewDelegate* delegate) |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 } | 551 } |
557 | 552 |
558 - (void)activateFieldForInput:(const autofill::DetailInput&)input { | 553 - (void)activateFieldForInput:(const autofill::DetailInput&)input { |
559 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { | 554 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { |
560 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); | 555 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); |
561 [[mainContainer_ sectionForId:section] activateFieldForInput:input]; | 556 [[mainContainer_ sectionForId:section] activateFieldForInput:input]; |
562 } | 557 } |
563 } | 558 } |
564 | 559 |
565 @end | 560 @end |
OLD | NEW |