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

Unified Diff: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm

Issue 2703253007: Use (i) icon and the same tooltip for the credit cards dialog and account chooser on Mac. (Closed)
Patch Set: rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
index be069af5d76782219e216f2f27583a4044526a39..5b3ad3cbd3906b1a6e9af5a102472cb0cd9d770b 100644
--- a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
@@ -2,14 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h"
+
#include "base/bind.h"
#include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
+#import "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_pop_up_button.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_tooltip_controller.h"
-#include "chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h"
#include "chrome/browser/ui/cocoa/chrome_style.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.h"
@@ -29,6 +31,9 @@
#include "ui/base/cocoa/window_size_constants.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
+#include "ui/gfx/image/image_skia_util_mac.h"
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/gfx/vector_icons_public.h"
#include "ui/native_theme/native_theme.h"
namespace {
@@ -492,12 +497,15 @@ void CardUnmaskPromptViewBridge::PerformClose() {
[storageCheckbox_ sizeToFit];
[box addSubview:storageCheckbox_];
- // Add "?" icon with tooltip.
+ // Add "i" icon with tooltip.
storageTooltip_.reset([[AutofillTooltipController alloc]
initWithArrowLocation:info_bubble::kTopTrailing]);
- [storageTooltip_ setImage:ui::ResourceBundle::GetSharedInstance()
- .GetNativeImageNamed(IDR_AUTOFILL_TOOLTIP_ICON)
- .ToNSImage()];
+ [storageTooltip_ setMaxTooltipWidth:2 * autofill::kFieldWidth +
+ autofill::kHorizontalFieldPadding];
+ [storageTooltip_
+ setImage:gfx::NSImageFromImageSkia(gfx::CreateVectorIcon(
+ gfx::VectorIconId::INFO_OUTLINE, autofill::kInfoIconSize,
+ gfx::kChromeIconGrey))];
[storageTooltip_
setMessage:base::SysUTF16ToNSString(l10n_util::GetStringUTF16(
IDS_AUTOFILL_CARD_UNMASK_PROMPT_STORAGE_TOOLTIP))];

Powered by Google App Engine
This is Rietveld 408576698