| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
| 6 #define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 6 #define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class ChromeSecurityStateModelClient | 25 class ChromeSecurityStateModelClient |
| 26 : public security_state::SecurityStateModelClient, | 26 : public security_state::SecurityStateModelClient, |
| 27 public content::WebContentsObserver, | 27 public content::WebContentsObserver, |
| 28 public content::WebContentsUserData<ChromeSecurityStateModelClient> { | 28 public content::WebContentsUserData<ChromeSecurityStateModelClient> { |
| 29 public: | 29 public: |
| 30 ~ChromeSecurityStateModelClient() override; | 30 ~ChromeSecurityStateModelClient() override; |
| 31 | 31 |
| 32 void GetSecurityInfo( | 32 void GetSecurityInfo( |
| 33 security_state::SecurityStateModel::SecurityInfo* result) const; | 33 security_state::SecurityStateModel::SecurityInfo* result) const; |
| 34 | 34 |
| 35 // Called when the NavigationEntry's SSLStatus changes. | 35 // Called when the NavigationEntry's SSLStatus or other security |
| 36 void VisibleSSLStateChanged(); | 36 // information changes. |
| 37 void VisibleSecurityStateChanged(); |
| 37 | 38 |
| 38 // content::WebContentsObserver: | 39 // content::WebContentsObserver: |
| 39 void DidFinishNavigation( | 40 void DidFinishNavigation( |
| 40 content::NavigationHandle* navigation_handle) override; | 41 content::NavigationHandle* navigation_handle) override; |
| 41 | 42 |
| 42 // Returns the SecurityStyle that should be applied to a WebContents | 43 // Returns the SecurityStyle that should be applied to a WebContents |
| 43 // with the given |security_info|. Populates | 44 // with the given |security_info|. Populates |
| 44 // |security_style_explanations| to explain why the returned | 45 // |security_style_explanations| to explain why the returned |
| 45 // SecurityStyle was chosen. | 46 // SecurityStyle was chosen. |
| 46 static blink::WebSecurityStyle GetSecurityStyle( | 47 static blink::WebSecurityStyle GetSecurityStyle( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 63 // True if a console has been logged about an omnibox warning that | 64 // True if a console has been logged about an omnibox warning that |
| 64 // will be shown in future versions of Chrome for insecure HTTP | 65 // will be shown in future versions of Chrome for insecure HTTP |
| 65 // pages. This message should only be logged once per main-frame | 66 // pages. This message should only be logged once per main-frame |
| 66 // navigation. | 67 // navigation. |
| 67 bool logged_http_warning_on_current_navigation_; | 68 bool logged_http_warning_on_current_navigation_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelClient); | 70 DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelClient); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 #endif // CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ | 73 #endif // CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ |
| OLD | NEW |