| 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 #import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_main_container.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 // Set up "Save in Chrome" checkbox. | 77 // Set up "Save in Chrome" checkbox. |
| 78 saveInChromeCheckbox_.reset([[NSButton alloc] initWithFrame:NSZeroRect]); | 78 saveInChromeCheckbox_.reset([[NSButton alloc] initWithFrame:NSZeroRect]); |
| 79 [saveInChromeCheckbox_ setButtonType:NSSwitchButton]; | 79 [saveInChromeCheckbox_ setButtonType:NSSwitchButton]; |
| 80 [saveInChromeCheckbox_ setTitle: | 80 [saveInChromeCheckbox_ setTitle: |
| 81 base::SysUTF16ToNSString(delegate_->SaveLocallyText())]; | 81 base::SysUTF16ToNSString(delegate_->SaveLocallyText())]; |
| 82 [saveInChromeCheckbox_ sizeToFit]; | 82 [saveInChromeCheckbox_ sizeToFit]; |
| 83 [[self view] addSubview:saveInChromeCheckbox_]; | 83 [[self view] addSubview:saveInChromeCheckbox_]; |
| 84 | 84 |
| 85 saveInChromeTooltip_.reset( | 85 saveInChromeTooltip_.reset( |
| 86 [[AutofillTooltipController alloc] init]); | 86 [[AutofillTooltipController alloc] |
| 87 initWithArrowLocation:info_bubble::kTopCenter]); |
| 87 [saveInChromeTooltip_ setImage: | 88 [saveInChromeTooltip_ setImage: |
| 88 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 89 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
| 89 IDR_AUTOFILL_TOOLTIP_ICON).ToNSImage()]; | 90 IDR_AUTOFILL_TOOLTIP_ICON).ToNSImage()]; |
| 90 [saveInChromeTooltip_ setMessage: | 91 [saveInChromeTooltip_ setMessage: |
| 91 base::SysUTF16ToNSString(delegate_->SaveLocallyTooltip())]; | 92 base::SysUTF16ToNSString(delegate_->SaveLocallyTooltip())]; |
| 92 [[self view] addSubview:[saveInChromeTooltip_ view]]; | 93 [[self view] addSubview:[saveInChromeTooltip_ view]]; |
| 93 [self updateSaveInChrome]; | 94 [self updateSaveInChrome]; |
| 94 | 95 |
| 95 detailsContainer_.reset( | 96 detailsContainer_.reset( |
| 96 [[AutofillDetailsContainer alloc] initWithDelegate:delegate_]); | 97 [[AutofillDetailsContainer alloc] initWithDelegate:delegate_]); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 410 |
| 410 - (NSImageView*)buttonStripImageForTesting { | 411 - (NSImageView*)buttonStripImageForTesting { |
| 411 return buttonStripImage_.get(); | 412 return buttonStripImage_.get(); |
| 412 } | 413 } |
| 413 | 414 |
| 414 - (NSButton*)saveInChromeTooltipForTesting { | 415 - (NSButton*)saveInChromeTooltipForTesting { |
| 415 return base::mac::ObjCCast<NSButton>([saveInChromeTooltip_ view]); | 416 return base::mac::ObjCCast<NSButton>([saveInChromeTooltip_ view]); |
| 416 } | 417 } |
| 417 | 418 |
| 418 @end | 419 @end |
| OLD | NEW |