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 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_view_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #include "chrome/browser/ui/chrome_style.h" | 10 #include "chrome/browser/ui/chrome_style.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 target:self | 106 target:self |
107 action:@selector(onDoneClicked:)] retain]); | 107 action:@selector(onDoneClicked:)] retain]); |
108 | 108 |
109 // Manage button. | 109 // Manage button. |
110 manageButton_.reset([[NSButton alloc] initWithFrame:NSZeroRect]); | 110 manageButton_.reset([[NSButton alloc] initWithFrame:NSZeroRect]); |
111 base::scoped_nsobject<HyperlinkButtonCell> cell([[HyperlinkButtonCell alloc] | 111 base::scoped_nsobject<HyperlinkButtonCell> cell([[HyperlinkButtonCell alloc] |
112 initTextCell:base::SysUTF16ToNSString(model_->manage_link())]); | 112 initTextCell:base::SysUTF16ToNSString(model_->manage_link())]); |
113 [cell setControlSize:NSSmallControlSize]; | 113 [cell setControlSize:NSSmallControlSize]; |
114 [cell setShouldUnderline:NO]; | 114 [cell setShouldUnderline:NO]; |
115 [cell setUnderlineOnHover:NO]; | 115 [cell setUnderlineOnHover:NO]; |
116 [cell setTextColor:gfx::SkColorToCalibratedNSColor( | 116 [cell setTextColor:skia::SkColorToCalibratedNSColor( |
117 chrome_style::GetLinkColor())]; | 117 chrome_style::GetLinkColor())]; |
118 [manageButton_ setCell:cell.get()]; | 118 [manageButton_ setCell:cell.get()]; |
119 [manageButton_ sizeToFit]; | 119 [manageButton_ sizeToFit]; |
120 [manageButton_ setTarget:self]; | 120 [manageButton_ setTarget:self]; |
121 [manageButton_ setAction:@selector(onManageClicked:)]; | 121 [manageButton_ setAction:@selector(onManageClicked:)]; |
122 [view addSubview:manageButton_]; | 122 [view addSubview:manageButton_]; |
123 | 123 |
124 // Layout the elements, starting at the bottom and moving up. | 124 // Layout the elements, starting at the bottom and moving up. |
125 | 125 |
126 // The Done button goes in the bottom-right corner. | 126 // The Done button goes in the bottom-right corner. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 - (NoPasswordsView*)noPasswordsView { | 178 - (NoPasswordsView*)noPasswordsView { |
179 return noPasswordsView_.get(); | 179 return noPasswordsView_.get(); |
180 } | 180 } |
181 | 181 |
182 - (PasswordsListViewController*)passwordsListController { | 182 - (PasswordsListViewController*)passwordsListController { |
183 return passwordsListController_.get(); | 183 return passwordsListController_.get(); |
184 } | 184 } |
185 | 185 |
186 @end | 186 @end |
OLD | NEW |