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

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

Issue 113763002: [rAc] [OSX] Set tooltip bubble arrow's anchor point based on the icon location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698