Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: chrome/browser/ui/views/ssl_client_certificate_selector.cc

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/native_constrained_window_win.cc ('k') | chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698