| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/page_info_bubble_view.h" | 5 #include "chrome/browser/ui/views/page_info_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 9 #include "chrome/browser/cert_store.h" | 9 #include "chrome/browser/cert_store.h" |
| 10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 show_history, this)), | 91 show_history, this)), |
| 92 parent_window_(parent_window), | 92 parent_window_(parent_window), |
| 93 cert_id_(ssl.cert_id()), | 93 cert_id_(ssl.cert_id()), |
| 94 info_bubble_(NULL), | 94 info_bubble_(NULL), |
| 95 help_center_link_(NULL), | 95 help_center_link_(NULL), |
| 96 ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)), | 96 ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)), |
| 97 animation_start_height_(0) { | 97 animation_start_height_(0) { |
| 98 if (cert_id_ > 0) { | 98 if (cert_id_ > 0) { |
| 99 scoped_refptr<net::X509Certificate> cert; | 99 scoped_refptr<net::X509Certificate> cert; |
| 100 CertStore::GetInstance()->RetrieveCert(cert_id_, &cert); | 100 CertStore::GetInstance()->RetrieveCert(cert_id_, &cert); |
| 101 // When running with fake certificate (Chrome Frame) or Gears in offline | 101 // When running with fake certificate (Chrome Frame), we have no os |
| 102 // mode, we have no os certificate, so there is no cert to show. Don't | 102 // certificate, so there is no cert to show. Don't bother showing the cert |
| 103 // bother showing the cert info link in that case. | 103 // info link in that case. |
| 104 if (!cert.get() || !cert->os_cert_handle()) | 104 if (!cert.get() || !cert->os_cert_handle()) |
| 105 cert_id_ = 0; | 105 cert_id_ = 0; |
| 106 } | 106 } |
| 107 LayoutSections(); | 107 LayoutSections(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 PageInfoBubbleView::~PageInfoBubbleView() { | 110 PageInfoBubbleView::~PageInfoBubbleView() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 void PageInfoBubbleView::ShowCertDialog() { | 113 void PageInfoBubbleView::ShowCertDialog() { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 PageInfoBubbleView* page_info_bubble = | 352 PageInfoBubbleView* page_info_bubble = |
| 353 new PageInfoBubbleView(parent, profile, url, ssl, show_history); | 353 new PageInfoBubbleView(parent, profile, url, ssl, show_history); |
| 354 InfoBubble* info_bubble = | 354 InfoBubble* info_bubble = |
| 355 InfoBubble::Show(browser_view->GetWidget(), bounds, | 355 InfoBubble::Show(browser_view->GetWidget(), bounds, |
| 356 BubbleBorder::TOP_LEFT, | 356 BubbleBorder::TOP_LEFT, |
| 357 page_info_bubble, page_info_bubble); | 357 page_info_bubble, page_info_bubble); |
| 358 page_info_bubble->set_info_bubble(info_bubble); | 358 page_info_bubble->set_info_bubble(info_bubble); |
| 359 } | 359 } |
| 360 | 360 |
| 361 } | 361 } |
| OLD | NEW |