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

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

Issue 1162393003: Replace info_bubble::BubbleArrowLocation with views::BubbleBorder::Arrow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile in test Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" 8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h"
9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
10 #include "chrome/browser/ui/chrome_style.h" 10 #include "chrome/browser/ui/chrome_style.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 setTitle:base::SysUTF16ToNSString(l10n_util::GetStringUTF16( 392 setTitle:base::SysUTF16ToNSString(l10n_util::GetStringUTF16(
393 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_CHECKBOX))]; 393 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_CHECKBOX))];
394 [storageCheckbox_ 394 [storageCheckbox_
395 setState:(controller->GetStoreLocallyStartState() ? NSOnState 395 setState:(controller->GetStoreLocallyStartState() ? NSOnState
396 : NSOffState)]; 396 : NSOffState)];
397 [storageCheckbox_ sizeToFit]; 397 [storageCheckbox_ sizeToFit];
398 [box addSubview:storageCheckbox_]; 398 [box addSubview:storageCheckbox_];
399 399
400 // Add "?" icon with tooltip. 400 // Add "?" icon with tooltip.
401 storageTooltip_.reset([[AutofillTooltipController alloc] 401 storageTooltip_.reset([[AutofillTooltipController alloc]
402 initWithArrowLocation:info_bubble::kTopRight]); 402 initWithArrowLocation:views::BubbleBorder::TOP_RIGHT]);
403 [storageTooltip_ setImage:ui::ResourceBundle::GetSharedInstance() 403 [storageTooltip_ setImage:ui::ResourceBundle::GetSharedInstance()
404 .GetNativeImageNamed(IDR_AUTOFILL_TOOLTIP_ICON) 404 .GetNativeImageNamed(IDR_AUTOFILL_TOOLTIP_ICON)
405 .ToNSImage()]; 405 .ToNSImage()];
406 [storageTooltip_ 406 [storageTooltip_
407 setMessage:base::SysUTF16ToNSString(l10n_util::GetStringUTF16( 407 setMessage:base::SysUTF16ToNSString(l10n_util::GetStringUTF16(
408 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP))]; 408 IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP))];
409 [box addSubview:[storageTooltip_ view]]; 409 [box addSubview:[storageTooltip_ view]];
410 [[storageTooltip_ view] setFrameOrigin: 410 [[storageTooltip_ view] setFrameOrigin:
411 NSMakePoint(NSMaxX([storageCheckbox_ frame]) + kButtonGap, 0)]; 411 NSMakePoint(NSMaxX([storageCheckbox_ frame]) + kButtonGap, 0)];
412 412
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 674
675 // Layout inputRowView_. 675 // Layout inputRowView_.
676 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_]; 676 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_];
677 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_]; 677 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_];
678 678
679 [self setView:mainView]; 679 [self setView:mainView];
680 [self performLayoutAndDisplay:NO]; 680 [self performLayoutAndDisplay:NO];
681 } 681 }
682 682
683 @end 683 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698