| 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/google/google_util.h" | 9 #include "chrome/browser/google/google_util.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 PageInfoBubbleView* page_info_bubble = | 364 PageInfoBubbleView* page_info_bubble = |
| 365 new PageInfoBubbleView(parent, profile, url, ssl, show_history); | 365 new PageInfoBubbleView(parent, profile, url, ssl, show_history); |
| 366 InfoBubble* info_bubble = | 366 InfoBubble* info_bubble = |
| 367 InfoBubble::Show(browser_view->GetWidget(), bounds, | 367 InfoBubble::Show(browser_view->GetWidget(), bounds, |
| 368 BubbleBorder::TOP_LEFT, | 368 BubbleBorder::TOP_LEFT, |
| 369 page_info_bubble, page_info_bubble); | 369 page_info_bubble, page_info_bubble); |
| 370 page_info_bubble->set_info_bubble(info_bubble); | 370 page_info_bubble->set_info_bubble(info_bubble); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } | 373 } |
| OLD | NEW |