OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h" | 7 #import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h" |
8 | 8 |
9 #include "base/mac/bind_objc_block.h" | 9 #include "base/mac/bind_objc_block.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
23 #include "ui/gfx/font_list.h" | 23 #include "ui/gfx/font_list.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 const int kAutoSigninToastTimeoutSeconds = 3; | 26 const int kAutoSigninToastTimeoutSeconds = 3; |
27 } // namespace | 27 } // namespace |
28 | 28 |
29 @interface AutoSigninViewController () { | 29 @interface AutoSigninViewController () { |
30 base::scoped_nsobject<CredentialItemButton> credentialView_; | 30 base::scoped_nsobject<CredentialItemButton> credentialView_; |
31 base::scoped_nsobject<AccountAvatarFetcherManager> avatarManager_; | 31 base::scoped_nsobject<AccountAvatarFetcherManager> avatarManager_; |
32 scoped_ptr<base::Timer> timer_; | 32 std::unique_ptr<base::Timer> timer_; |
33 } | 33 } |
34 - (instancetype) | 34 - (instancetype) |
35 initWithAvatarManager:(AccountAvatarFetcherManager*)avatarManager | 35 initWithAvatarManager:(AccountAvatarFetcherManager*)avatarManager |
36 delegate:(id<BasePasswordsContentViewDelegate>)delegate; | 36 delegate:(id<BasePasswordsContentViewDelegate>)delegate; |
37 @end | 37 @end |
38 | 38 |
39 @implementation AutoSigninViewController | 39 @implementation AutoSigninViewController |
40 | 40 |
41 - (instancetype)initWithDelegate: | 41 - (instancetype)initWithDelegate: |
42 (id<BasePasswordsContentViewDelegate>)delegate { | 42 (id<BasePasswordsContentViewDelegate>)delegate { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 forView:credentialView_]; | 83 forView:credentialView_]; |
84 } | 84 } |
85 [credentialView_ sizeToFit]; | 85 [credentialView_ sizeToFit]; |
86 NSRect frame = [credentialView_ frame]; | 86 NSRect frame = [credentialView_ frame]; |
87 frame.size.height += 2 * kVerticalAvatarMargin; | 87 frame.size.height += 2 * kVerticalAvatarMargin; |
88 [credentialView_ setFrame:frame]; | 88 [credentialView_ setFrame:frame]; |
89 [self setView:credentialView_]; | 89 [self setView:credentialView_]; |
90 } | 90 } |
91 | 91 |
92 @end | 92 @end |
OLD | NEW |