#ifndef CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/notification_observer.h"
#include "net/cert/signed_certificate_timestamp.h"
#include "net/ssl/signed_certificate_timestamp_and_status.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/window/dialog_delegate.h"
namespace content {
class WebContents;
}
namespace views {
class Combobox;
class Widget;
}
class SignedCertificateTimestampInfoView;
class SCTListModel;
class SignedCertificateTimestampsViews : public views::DialogDelegateView,
public content::NotificationObserver,
public views::ComboboxListener {
public:
SignedCertificateTimestampsViews(
content::WebContents* web_contents,
const net::SignedCertificateTimestampAndStatusList& sct_list);
virtual ~SignedCertificateTimestampsViews();
virtual base::string16 GetWindowTitle() const OVERRIDE;
virtual int GetDialogButtons() const OVERRIDE;
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details)
OVERRIDE;
private:
void Init();
void ShowSCTInfo(int sct_index);
virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE;
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
content::WebContents* web_contents_;
SignedCertificateTimestampInfoView* sct_info_view_;
scoped_ptr<SCTListModel> sct_list_model_;
scoped_ptr<views::Combobox> sct_selector_box_;
net::SignedCertificateTimestampAndStatusList sct_list_;
DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampsViews);
};
#endif