| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
| 10 #include "net/cert/signed_certificate_timestamp.h" | 10 #include "net/cert/signed_certificate_timestamp.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public content::NotificationObserver, | 29 public content::NotificationObserver, |
| 30 public views::ComboboxListener { | 30 public views::ComboboxListener { |
| 31 public: | 31 public: |
| 32 // Use ShowSignedCertificateTimestampsViewer to show. | 32 // Use ShowSignedCertificateTimestampsViewer to show. |
| 33 SignedCertificateTimestampsViews( | 33 SignedCertificateTimestampsViews( |
| 34 content::WebContents* web_contents, | 34 content::WebContents* web_contents, |
| 35 const net::SignedCertificateTimestampAndStatusList& sct_list); | 35 const net::SignedCertificateTimestampAndStatusList& sct_list); |
| 36 virtual ~SignedCertificateTimestampsViews(); | 36 virtual ~SignedCertificateTimestampsViews(); |
| 37 | 37 |
| 38 // views::DialogDelegate: | 38 // views::DialogDelegate: |
| 39 virtual base::string16 GetWindowTitle() const OVERRIDE; | 39 virtual base::string16 GetWindowTitle() const override; |
| 40 virtual int GetDialogButtons() const OVERRIDE; | 40 virtual int GetDialogButtons() const override; |
| 41 virtual ui::ModalType GetModalType() const OVERRIDE; | 41 virtual ui::ModalType GetModalType() const override; |
| 42 | 42 |
| 43 // views::View: | 43 // views::View: |
| 44 virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) | 44 virtual void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) |
| 45 OVERRIDE; | 45 override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void Init(); | 48 void Init(); |
| 49 | 49 |
| 50 void ShowSCTInfo(int sct_index); | 50 void ShowSCTInfo(int sct_index); |
| 51 | 51 |
| 52 // views::ComboboxListener: | 52 // views::ComboboxListener: |
| 53 virtual void OnPerformAction(views::Combobox* combobox) OVERRIDE; | 53 virtual void OnPerformAction(views::Combobox* combobox) override; |
| 54 | 54 |
| 55 // content::NotificationObserver: | 55 // content::NotificationObserver: |
| 56 virtual void Observe(int type, | 56 virtual void Observe(int type, |
| 57 const content::NotificationSource& source, | 57 const content::NotificationSource& source, |
| 58 const content::NotificationDetails& details) OVERRIDE; | 58 const content::NotificationDetails& details) override; |
| 59 | 59 |
| 60 SignedCertificateTimestampInfoView* sct_info_view_; | 60 SignedCertificateTimestampInfoView* sct_info_view_; |
| 61 | 61 |
| 62 scoped_ptr<SCTListModel> sct_list_model_; | 62 scoped_ptr<SCTListModel> sct_list_model_; |
| 63 // The Combobox used to select the SCT to display. This class owns the pointer | 63 // The Combobox used to select the SCT to display. This class owns the pointer |
| 64 // as it has to be deleted explicitly before the views c'tor is called: | 64 // as it has to be deleted explicitly before the views c'tor is called: |
| 65 // The Combobox d'tor refers to the model it holds, which will be destructed | 65 // The Combobox d'tor refers to the model it holds, which will be destructed |
| 66 // as part of tearing down this class. So it will not be available when the | 66 // as part of tearing down this class. So it will not be available when the |
| 67 // Views d'tor destroys the Combobox, leading to a crash. | 67 // Views d'tor destroys the Combobox, leading to a crash. |
| 68 // Must be deleted before the model. | 68 // Must be deleted before the model. |
| 69 scoped_ptr<views::Combobox> sct_selector_box_; | 69 scoped_ptr<views::Combobox> sct_selector_box_; |
| 70 net::SignedCertificateTimestampAndStatusList sct_list_; | 70 net::SignedCertificateTimestampAndStatusList sct_list_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampsViews); | 72 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampsViews); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ | 75 #endif // CHROME_BROWSER_UI_VIEWS_SIGNED_CERTIFICATE_TIMESTAMPS_VIEWS_H_ |
| OLD | NEW |