// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_ #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_ #pragma once #include #include "base/memory/linked_ptr.h" #include "content/browser/renderer_host/render_view_host_delegate.h" class SSLAddCertHandler; class SSLClientAuthHandler; class TabContents; class TabContentsSSLHelper : public RenderViewHostDelegate::SSL { public: explicit TabContentsSSLHelper(TabContents* tab_contents); virtual ~TabContentsSSLHelper(); // RenderViewHostDelegate::SSL implementation: virtual void ShowClientCertificateRequestDialog( scoped_refptr handler); virtual void OnVerifyClientCertificateError( scoped_refptr handler, int error_code); virtual void AskToAddClientCertificate( scoped_refptr handler); virtual void OnAddClientCertificateSuccess( scoped_refptr handler); virtual void OnAddClientCertificateError( scoped_refptr handler, int error_code); virtual void OnAddClientCertificateFinished( scoped_refptr handler); private: TabContents* tab_contents_; class SSLAddCertData; std::map > request_id_to_add_cert_data_; SSLAddCertData* GetAddCertData(SSLAddCertHandler* handler); DISALLOW_COPY_AND_ASSIGN(TabContentsSSLHelper); }; #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_