OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 layout->AddView(table_->CreateParentIfNecessary(), 1, 1, | 134 layout->AddView(table_->CreateParentIfNecessary(), 1, 1, |
135 views::GridLayout::FILL, | 135 views::GridLayout::FILL, |
136 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); | 136 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); |
137 | 137 |
138 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 138 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
139 | 139 |
140 CreateViewCertButton(); | 140 CreateViewCertButton(); |
141 | 141 |
142 StartObserving(); | 142 StartObserving(); |
143 | 143 |
144 window_ = new ConstrainedWindowViews(web_contents_, this); | 144 window_ = ConstrainedWindowViews::Create(web_contents_, this); |
145 | 145 |
146 // Select the first row automatically. This must be done after the dialog has | 146 // Select the first row automatically. This must be done after the dialog has |
147 // been created. | 147 // been created. |
148 table_->Select(0); | 148 table_->Select(0); |
149 } | 149 } |
150 | 150 |
151 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() const { | 151 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() const { |
152 int selected = table_->FirstSelectedRow(); | 152 int selected = table_->FirstSelectedRow(); |
153 if (selected >= 0 && | 153 if (selected >= 0 && |
154 selected < static_cast<int>( | 154 selected < static_cast<int>( |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 const net::HttpNetworkSession* network_session, | 290 const net::HttpNetworkSession* network_session, |
291 net::SSLCertRequestInfo* cert_request_info, | 291 net::SSLCertRequestInfo* cert_request_info, |
292 const chrome::SelectCertificateCallback& callback) { | 292 const chrome::SelectCertificateCallback& callback) { |
293 DVLOG(1) << __FUNCTION__ << " " << contents; | 293 DVLOG(1) << __FUNCTION__ << " " << contents; |
294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
295 (new SSLClientCertificateSelector( | 295 (new SSLClientCertificateSelector( |
296 contents, network_session, cert_request_info, callback))->Init(); | 296 contents, network_session, cert_request_info, callback))->Init(); |
297 } | 297 } |
298 | 298 |
299 } // namespace chrome | 299 } // namespace chrome |
OLD | NEW |