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

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

Issue 55243005: Implement learn more bubble on views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 1 month 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 #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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 base::SysUTF16ToNSString(delegate_->SaveLocallyText())]; 64 base::SysUTF16ToNSString(delegate_->SaveLocallyText())];
65 [self updateSaveInChrome]; 65 [self updateSaveInChrome];
66 [saveInChromeCheckbox_ sizeToFit]; 66 [saveInChromeCheckbox_ sizeToFit];
67 [[self view] addSubview:saveInChromeCheckbox_]; 67 [[self view] addSubview:saveInChromeCheckbox_];
68 68
69 saveInChromeTooltip_.reset([[NSImageView alloc] initWithFrame:NSZeroRect]); 69 saveInChromeTooltip_.reset([[NSImageView alloc] initWithFrame:NSZeroRect]);
70 [saveInChromeTooltip_ setImage: 70 [saveInChromeTooltip_ setImage:
71 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 71 ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
72 IDR_AUTOFILL_TOOLTIP_ICON).ToNSImage()]; 72 IDR_AUTOFILL_TOOLTIP_ICON).ToNSImage()];
73 [saveInChromeTooltip_ setToolTip: 73 [saveInChromeTooltip_ setToolTip:
74 base::SysUTF16ToNSString(delegate_->SaveLocallyTooltip())]; 74 base::SysUTF16ToNSString(delegate_->SaveLocallyLearnMoreText())];
75 [saveInChromeTooltip_ setFrameSize:[[saveInChromeTooltip_ image] size]]; 75 [saveInChromeTooltip_ setFrameSize:[[saveInChromeTooltip_ image] size]];
76 [[self view] addSubview:saveInChromeTooltip_]; 76 [[self view] addSubview:saveInChromeTooltip_];
77 77
78 detailsContainer_.reset( 78 detailsContainer_.reset(
79 [[AutofillDetailsContainer alloc] initWithDelegate:delegate_]); 79 [[AutofillDetailsContainer alloc] initWithDelegate:delegate_]);
80 NSSize frameSize = [[detailsContainer_ view] frame].size; 80 NSSize frameSize = [[detailsContainer_ view] frame].size;
81 [[detailsContainer_ view] setFrameOrigin: 81 [[detailsContainer_ view] setFrameOrigin:
82 NSMakePoint(0, NSHeight([buttonContainer_ frame]))]; 82 NSMakePoint(0, NSHeight([buttonContainer_ frame]))];
83 frameSize.height += NSHeight([buttonContainer_ frame]); 83 frameSize.height += NSHeight([buttonContainer_ frame]);
84 [[self view] setFrameSize:frameSize]; 84 [[self view] setFrameSize:frameSize];
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 - (NSImageView*)buttonStripImageForTesting { 345 - (NSImageView*)buttonStripImageForTesting {
346 return buttonStripImage_.get(); 346 return buttonStripImage_.get();
347 } 347 }
348 348
349 - (NSImageView*)saveInChromeTooltipForTesting { 349 - (NSImageView*)saveInChromeTooltipForTesting {
350 return saveInChromeTooltip_.get(); 350 return saveInChromeTooltip_.get();
351 } 351 }
352 352
353 @end 353 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698