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

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

Issue 12041059: content: convert SSL notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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 1835621edf7872af65687a59a60455e5d5c964c0..94f4b1ef665c18ea411624e1c8f65ae1c4892d13 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