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

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

Issue 165073002: Remove deprecated version of views::CreateDialogFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore ConstrainedWebDialogDelegateViewViews::CreateNonClientFrameView. Created 6 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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/certificate_viewer.h" 11 #include "chrome/browser/certificate_viewer.h"
12 #include "chrome/browser/ui/views/constrained_window_views.h"
13 #include "components/web_modal/web_contents_modal_dialog_host.h" 12 #include "components/web_modal/web_contents_modal_dialog_host.h"
14 #include "components/web_modal/web_contents_modal_dialog_manager.h" 13 #include "components/web_modal/web_contents_modal_dialog_manager.h"
15 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 14 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
16 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
17 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
18 #include "content/public/browser/web_contents_view.h" 17 #include "content/public/browser/web_contents_view.h"
19 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
20 #include "net/cert/x509_certificate.h" 19 #include "net/cert/x509_certificate.h"
21 #include "net/ssl/ssl_cert_request_info.h" 20 #include "net/ssl/ssl_cert_request_info.h"
22 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 cert)); 230 cert));
232 #else 231 #else
233 Unlocked(cert); 232 Unlocked(cert);
234 #endif 233 #endif
235 return false; // Unlocked() will close the dialog. 234 return false; // Unlocked() will close the dialog.
236 } 235 }
237 236
238 return false; 237 return false;
239 } 238 }
240 239
241 // TODO(wittman): Remove this override once we move to the new style frame view
242 // on all dialogs.
243 views::NonClientFrameView*
244 SSLClientCertificateSelector::CreateNonClientFrameView(
245 views::Widget* widget) {
246 return CreateConstrainedStyleNonClientFrameView(
247 widget,
248 web_contents_->GetBrowserContext());
249 }
250
251 views::View* SSLClientCertificateSelector::GetInitiallyFocusedView() { 240 views::View* SSLClientCertificateSelector::GetInitiallyFocusedView() {
252 return table_; 241 return table_;
253 } 242 }
254 243
255 views::View* SSLClientCertificateSelector::CreateExtraView() { 244 views::View* SSLClientCertificateSelector::CreateExtraView() {
256 DCHECK(!view_cert_button_); 245 DCHECK(!view_cert_button_);
257 view_cert_button_ = new views::LabelButton(this, 246 view_cert_button_ = new views::LabelButton(this,
258 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON)); 247 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON));
259 view_cert_button_->SetStyle(views::Button::STYLE_BUTTON); 248 view_cert_button_->SetStyle(views::Button::STYLE_BUTTON);
260 return view_cert_button_; 249 return view_cert_button_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 const net::HttpNetworkSession* network_session, 308 const net::HttpNetworkSession* network_session,
320 net::SSLCertRequestInfo* cert_request_info, 309 net::SSLCertRequestInfo* cert_request_info,
321 const chrome::SelectCertificateCallback& callback) { 310 const chrome::SelectCertificateCallback& callback) {
322 DVLOG(1) << __FUNCTION__ << " " << contents; 311 DVLOG(1) << __FUNCTION__ << " " << contents;
323 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 312 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
324 (new SSLClientCertificateSelector( 313 (new SSLClientCertificateSelector(
325 contents, network_session, cert_request_info, callback))->Init(); 314 contents, network_session, cert_request_info, callback))->Init();
326 } 315 }
327 316
328 } // namespace chrome 317 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ssl_client_certificate_selector.h ('k') | chrome/browser/ui/views/tab_modal_confirm_dialog_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698