| OLD | NEW |
| 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/chrome_style.h" | 9 #include "chrome/browser/ui/chrome_style.h" |
| 10 #import "chrome/browser/ui/cocoa/autofill/autofill_pop_up_button.h" | 10 #import "chrome/browser/ui/cocoa/autofill/autofill_pop_up_button.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 const SkColor kPermanentErrorTextColor = SK_ColorWHITE; | 53 const SkColor kPermanentErrorTextColor = SK_ColorWHITE; |
| 54 // TODO(bondd): Unify colors with Views version and AutofillMessageView. | 54 // TODO(bondd): Unify colors with Views version and AutofillMessageView. |
| 55 const SkColor kShadingColor = SkColorSetRGB(0xf2, 0xf2, 0xf2); | 55 const SkColor kShadingColor = SkColorSetRGB(0xf2, 0xf2, 0xf2); |
| 56 const SkColor kSubtleBorderColor = SkColorSetRGB(0xdf, 0xdf, 0xdf); | 56 const SkColor kSubtleBorderColor = SkColorSetRGB(0xdf, 0xdf, 0xdf); |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 namespace autofill { | 60 namespace autofill { |
| 61 | 61 |
| 62 CardUnmaskPromptView* CreateCardUnmaskPromptView( | |
| 63 CardUnmaskPromptController* controller, | |
| 64 content::WebContents* web_contents) { | |
| 65 return new CardUnmaskPromptViewBridge(controller, web_contents); | |
| 66 } | |
| 67 | |
| 68 #pragma mark CardUnmaskPromptViewBridge | 62 #pragma mark CardUnmaskPromptViewBridge |
| 69 | 63 |
| 70 CardUnmaskPromptViewBridge::CardUnmaskPromptViewBridge( | 64 CardUnmaskPromptViewBridge::CardUnmaskPromptViewBridge( |
| 71 CardUnmaskPromptController* controller, | 65 CardUnmaskPromptController* controller, |
| 72 content::WebContents* web_contents) | 66 content::WebContents* web_contents) |
| 73 : controller_(controller), | 67 : controller_(controller), |
| 74 web_contents_(web_contents), | 68 web_contents_(web_contents), |
| 75 weak_ptr_factory_(this) { | 69 weak_ptr_factory_(this) { |
| 76 view_controller_.reset( | 70 view_controller_.reset( |
| 77 [[CardUnmaskPromptViewCocoa alloc] initWithBridge:this]); | 71 [[CardUnmaskPromptViewCocoa alloc] initWithBridge:this]); |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 [verifyButton_ setAction:@selector(onVerify:)]; | 729 [verifyButton_ setAction:@selector(onVerify:)]; |
| 736 [verifyButton_ sizeToFit]; | 730 [verifyButton_ sizeToFit]; |
| 737 [self updateVerifyButtonEnabled]; | 731 [self updateVerifyButtonEnabled]; |
| 738 [mainView addSubview:verifyButton_]; | 732 [mainView addSubview:verifyButton_]; |
| 739 | 733 |
| 740 [self setView:mainView]; | 734 [self setView:mainView]; |
| 741 [self performLayoutAndDisplay:NO]; | 735 [self performLayoutAndDisplay:NO]; |
| 742 } | 736 } |
| 743 | 737 |
| 744 @end | 738 @end |
| OLD | NEW |