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

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

Issue 2026353002: [Autofill] Credit Card Assist Infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaning Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" 5 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h" 9 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
10 #include "chrome/browser/ui/chrome_style.h" 10 #include "chrome/browser/ui/chrome_style.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 NSColor* linkColor = 277 NSColor* linkColor =
278 skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor()); 278 skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor());
279 NSRange range = NSMakeRange(0, [learnMoreString length]); 279 NSRange range = NSMakeRange(0, [learnMoreString length]);
280 [learnMoreLink addLinkRange:range withURL:nil linkColor:linkColor]; 280 [learnMoreLink addLinkRange:range withURL:nil linkColor:linkColor];
281 [[learnMoreLink textStorage] addAttribute:NSUnderlineStyleAttributeName 281 [[learnMoreLink textStorage] addAttribute:NSUnderlineStyleAttributeName
282 value:@(NSUnderlineStyleNone) 282 value:@(NSUnderlineStyleNone)
283 range:range]; 283 range:range];
284 284
285 // Cancel button. 285 // Cancel button.
286 base::scoped_nsobject<NSButton> cancelButton([SaveCardBubbleViewCocoa 286 base::scoped_nsobject<NSButton> cancelButton([SaveCardBubbleViewCocoa
287 makeButton:l10n_util::GetNSString(IDS_AUTOFILL_SAVE_CARD_PROMPT_DENY)]); 287 makeButton:l10n_util::GetNSString(IDS_NO_THANKS)]);
288 [cancelButton setTarget:self]; 288 [cancelButton setTarget:self];
289 [cancelButton setAction:@selector(onCancelButton:)]; 289 [cancelButton setAction:@selector(onCancelButton:)];
290 [cancelButton setKeyEquivalent:@"\e"]; 290 [cancelButton setKeyEquivalent:@"\e"];
291 291
292 // Save button. 292 // Save button.
293 base::scoped_nsobject<NSButton> saveButton([SaveCardBubbleViewCocoa 293 base::scoped_nsobject<NSButton> saveButton([SaveCardBubbleViewCocoa
294 makeButton:l10n_util::GetNSString(IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT)]); 294 makeButton:l10n_util::GetNSString(IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT)]);
295 [saveButton setTarget:self]; 295 [saveButton setTarget:self];
296 [saveButton setAction:@selector(onSaveButton:)]; 296 [saveButton setAction:@selector(onSaveButton:)];
297 [saveButton setKeyEquivalent:@"\r"]; 297 [saveButton setKeyEquivalent:@"\r"];
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 426 }
427 } 427 }
428 428
429 // If none of the legal message links are the source of the click, the source 429 // If none of the legal message links are the source of the click, the source
430 // must be the learn more link. 430 // must be the learn more link.
431 bridge_->OnLearnMoreClicked(); 431 bridge_->OnLearnMoreClicked();
432 return YES; 432 return YES;
433 } 433 }
434 434
435 @end 435 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | chrome/browser/ui/views/autofill/save_card_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698