OLD | NEW |
1 // Copyright (c) 2011 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/webui/ssl_client_certificate_selector_webui.h" | 5 #include "chrome/browser/ui/webui/ssl_client_certificate_selector_webui.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 //////////////////////////////////////////////////////////////////////////////// | 289 //////////////////////////////////////////////////////////////////////////////// |
290 // Platform API | 290 // Platform API |
291 | 291 |
292 namespace browser { | 292 namespace browser { |
293 | 293 |
294 void ShowSSLClientCertificateSelector( | 294 void ShowSSLClientCertificateSelector( |
295 TabContentsWrapper* wrapper, | 295 TabContentsWrapper* wrapper, |
296 net::SSLCertRequestInfo* cert_request_info, | 296 net::SSLCertRequestInfo* cert_request_info, |
297 SSLClientAuthHandler* delegate) { | 297 SSLClientAuthHandler* delegate) { |
298 #if defined(USE_AURA) || defined(OS_CHROMEOS) | 298 // TODO(jhawkins): move this into a non-webui location. |
| 299 #if defined(USE_AURA) |
| 300 ShowNativeSSLClientCertificateSelector(wrapper, |
| 301 cert_request_info, |
| 302 delegate); |
| 303 #elif defined(OS_CHROMEOS) |
299 SSLClientCertificateSelectorWebUI::ShowDialog(wrapper, | 304 SSLClientCertificateSelectorWebUI::ShowDialog(wrapper, |
300 cert_request_info, | 305 cert_request_info, |
301 delegate); | 306 delegate); |
302 #else | 307 #else |
303 // TODO(rbyers): Remove the IsMoreWebUI check and (ideally) all #ifdefs onnce | 308 // TODO(rbyers): Remove the IsMoreWebUI check and (ideally) all #ifdefs onnce |
304 // we can select exactly one version of this dialog to use for each platform | 309 // we can select exactly one version of this dialog to use for each platform |
305 // at build time. http://crbug.com/102775 | 310 // at build time. http://crbug.com/102775 |
306 if (chrome_web_ui::IsMoreWebUI()) | 311 if (chrome_web_ui::IsMoreWebUI()) |
307 SSLClientCertificateSelectorWebUI::ShowDialog(wrapper, | 312 SSLClientCertificateSelectorWebUI::ShowDialog(wrapper, |
308 cert_request_info, | 313 cert_request_info, |
309 delegate); | 314 delegate); |
310 else | 315 else |
311 ShowNativeSSLClientCertificateSelector(wrapper, | 316 ShowNativeSSLClientCertificateSelector(wrapper, |
312 cert_request_info, | 317 cert_request_info, |
313 delegate); | 318 delegate); |
314 #endif | 319 #endif |
315 } | 320 } |
316 | 321 |
317 } // namespace browser | 322 } // namespace browser |
OLD | NEW |