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/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
9 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 9 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 CardUnmaskPromptViewBridge::~CardUnmaskPromptViewBridge() { | 80 CardUnmaskPromptViewBridge::~CardUnmaskPromptViewBridge() { |
81 } | 81 } |
82 | 82 |
83 void CardUnmaskPromptViewBridge::Show() { | 83 void CardUnmaskPromptViewBridge::Show() { |
84 // Setup the constrained window that will show the view. | 84 // Setup the constrained window that will show the view. |
85 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] | 85 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] |
86 initWithContentRect:[[view_controller_ view] bounds]]); | 86 initWithContentRect:[[view_controller_ view] bounds]]); |
87 [window setContentView:[view_controller_ view]]; | 87 [window setContentView:[view_controller_ view]]; |
88 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( | 88 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( |
89 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]); | 89 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]); |
90 constrained_window_.reset( | 90 constrained_window_.reset(ShowWebModalDialogMac(this, web_contents_, sheet)); |
91 new ConstrainedWindowMac(this, web_contents_, sheet)); | |
92 } | 91 } |
93 | 92 |
94 void CardUnmaskPromptViewBridge::ControllerGone() { | 93 void CardUnmaskPromptViewBridge::ControllerGone() { |
95 controller_ = nullptr; | 94 controller_ = nullptr; |
96 PerformClose(); | 95 PerformClose(); |
97 } | 96 } |
98 | 97 |
99 void CardUnmaskPromptViewBridge::DisableAndWaitForVerification() { | 98 void CardUnmaskPromptViewBridge::DisableAndWaitForVerification() { |
100 [view_controller_ setProgressOverlayText: | 99 [view_controller_ setProgressOverlayText: |
101 l10n_util::GetStringUTF16( | 100 l10n_util::GetStringUTF16( |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 [verifyButton_ setAction:@selector(onVerify:)]; | 737 [verifyButton_ setAction:@selector(onVerify:)]; |
739 [verifyButton_ sizeToFit]; | 738 [verifyButton_ sizeToFit]; |
740 [self updateVerifyButtonEnabled]; | 739 [self updateVerifyButtonEnabled]; |
741 [mainView addSubview:verifyButton_]; | 740 [mainView addSubview:verifyButton_]; |
742 | 741 |
743 [self setView:mainView]; | 742 [self setView:mainView]; |
744 [self performLayoutAndDisplay:NO]; | 743 [self performLayoutAndDisplay:NO]; |
745 } | 744 } |
746 | 745 |
747 @end | 746 @end |
OLD | NEW |