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

Unified Diff: chrome/browser/ssl/ssl_tab_helper.cc

Issue 12249003: content: convert SSL notifications to observer usage (take 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_tab_helper.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_tab_helper.cc
diff --git a/chrome/browser/ssl/ssl_tab_helper.cc b/chrome/browser/ssl/ssl_tab_helper.cc
index 3be816a253514786d534212f952b1affc3f90164..886db8ac6436a6ad76473244fdff7e4345aacf5e 100644
--- a/chrome/browser/ssl/ssl_tab_helper.cc
+++ b/chrome/browser/ssl/ssl_tab_helper.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ssl/ssl_add_cert_handler.h"
#include "chrome/browser/ssl/ssl_client_certificate_selector.h"
+#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_details.h"
@@ -191,12 +192,21 @@ void SSLTabHelper::SSLAddCertData::Observe(
DEFINE_WEB_CONTENTS_USER_DATA_KEY(SSLTabHelper);
SSLTabHelper::SSLTabHelper(content::WebContents* contents)
- : web_contents_(contents) {
+ : WebContentsObserver(contents),
+ web_contents_(contents) {
}
SSLTabHelper::~SSLTabHelper() {
}
+void SSLTabHelper::DidChangeVisibleSSLState() {
+#if !defined(OS_ANDROID)
+ Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
+ if (browser)
+ browser->VisibleSSLStateChanged(web_contents_);
+#endif // !defined(OS_ANDROID)
+}
+
void SSLTabHelper::ShowClientCertificateRequestDialog(
const net::HttpNetworkSession* network_session,
net::SSLCertRequestInfo* cert_request_info,
« no previous file with comments | « chrome/browser/ssl/ssl_tab_helper.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698