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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 144 window_ = new ConstrainedWindowViews( |
145 tab_contents_->web_contents(), this, false, | 145 tab_contents_->web_contents(), this, false, |
146 ConstrainedWindowViews::DEFAULT_INSETS); | 146 ConstrainedWindowViews::FRAME_LAYOUT_FULL); |
147 | 147 |
148 // Select the first row automatically. This must be done after the dialog has | 148 // Select the first row automatically. This must be done after the dialog has |
149 // been created. | 149 // been created. |
150 table_->Select(0); | 150 table_->Select(0); |
151 } | 151 } |
152 | 152 |
153 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() const { | 153 net::X509Certificate* SSLClientCertificateSelector::GetSelectedCert() const { |
154 int selected = table_->FirstSelectedRow(); | 154 int selected = table_->FirstSelectedRow(); |
155 if (selected >= 0 && | 155 if (selected >= 0 && |
156 selected < static_cast<int>( | 156 selected < static_cast<int>( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 net::SSLCertRequestInfo* cert_request_info, | 290 net::SSLCertRequestInfo* cert_request_info, |
291 const base::Callback<void(net::X509Certificate*)>& callback) { | 291 const base::Callback<void(net::X509Certificate*)>& callback) { |
292 DVLOG(1) << __FUNCTION__ << " " << contents; | 292 DVLOG(1) << __FUNCTION__ << " " << contents; |
293 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 293 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
294 TabContents* tab_contents = TabContents::FromWebContents(contents); | 294 TabContents* tab_contents = TabContents::FromWebContents(contents); |
295 (new SSLClientCertificateSelector( | 295 (new SSLClientCertificateSelector( |
296 tab_contents, network_session, cert_request_info, callback))->Init(); | 296 tab_contents, network_session, cert_request_info, callback))->Init(); |
297 } | 297 } |
298 | 298 |
299 } // namespace chrome | 299 } // namespace chrome |
OLD | NEW |