| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 class BrowserContext; | 26 class BrowserContext; |
| 27 class NavigationEntryImpl; | 27 class NavigationEntryImpl; |
| 28 class NavigationControllerImpl; | 28 class NavigationControllerImpl; |
| 29 class SSLPolicy; | 29 class SSLPolicy; |
| 30 struct LoadCommittedDetails; | 30 struct LoadCommittedDetails; |
| 31 struct LoadFromMemoryCacheDetails; | 31 struct LoadFromMemoryCacheDetails; |
| 32 struct ResourceRedirectDetails; | 32 struct ResourceRedirectDetails; |
| 33 struct ResourceRequestDetails; | 33 struct ResourceRequestDetails; |
| 34 struct SSLStatus; |
| 34 | 35 |
| 35 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It | 36 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It |
| 36 // listens for various events that influence when these elements should or | 37 // listens for various events that influence when these elements should or |
| 37 // should not be displayed and adjusts them accordingly. | 38 // should not be displayed and adjusts them accordingly. |
| 38 // | 39 // |
| 39 // There is one SSLManager per tab. | 40 // There is one SSLManager per tab. |
| 40 // The security state (secure/insecure) is stored in the navigation entry. | 41 // The security state (secure/insecure) is stored in the navigation entry. |
| 41 // Along with it are stored any SSL error code and the associated cert. | 42 // Along with it are stored any SSL error code and the associated cert. |
| 42 | 43 |
| 43 class CONTENT_EXPORT SSLManager { | 44 class CONTENT_EXPORT SSLManager { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 // The navigation controller associated with this SSLManager. The | 72 // The navigation controller associated with this SSLManager. The |
| 72 // NavigationController is guaranteed to outlive the SSLManager. | 73 // NavigationController is guaranteed to outlive the SSLManager. |
| 73 NavigationControllerImpl* controller() { return controller_; } | 74 NavigationControllerImpl* controller() { return controller_; } |
| 74 | 75 |
| 75 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); | 76 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); |
| 76 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); | 77 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); |
| 77 void DidStartResourceResponse(const ResourceRequestDetails& details); | 78 void DidStartResourceResponse(const ResourceRequestDetails& details); |
| 78 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); | 79 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); |
| 79 | 80 |
| 80 // Insecure content entry point. | 81 // Insecure content entry point. |
| 81 void DidDisplayInsecureContent(); | 82 void DidRunInsecureContent(const GURL& security_origin); |
| 82 void DidRunInsecureContent(const std::string& security_origin); | |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 // Updates the NavigationEntry with our current state. This will | 85 // Updates the NavigationEntry with our current state. This will |
| 86 // notify the WebContents of an SSL state change if a change was | 86 // notify the WebContents of an SSL state change if a change was |
| 87 // actually made. | 87 // actually made. |
| 88 void UpdateEntry(NavigationEntryImpl* entry); | 88 void UpdateEntry(NavigationEntryImpl* entry); |
| 89 | 89 |
| 90 // Notifies the WebContents that the SSL state changed. | 90 // Notifies the WebContents that the SSL state changed. |
| 91 void NotifyDidChangeVisibleSSLState(); | 91 void NotifyDidChangeVisibleSSLState(); |
| 92 | 92 |
| 93 // The backend for the SSLPolicy to actuate its decisions. | 93 // The backend for the SSLPolicy to actuate its decisions. |
| 94 SSLPolicyBackend backend_; | 94 SSLPolicyBackend backend_; |
| 95 | 95 |
| 96 // The SSLPolicy instance for this manager. | 96 // The SSLPolicy instance for this manager. |
| 97 scoped_ptr<SSLPolicy> policy_; | 97 scoped_ptr<SSLPolicy> policy_; |
| 98 | 98 |
| 99 // The NavigationController that owns this SSLManager. We are responsible | 99 // The NavigationController that owns this SSLManager. We are responsible |
| 100 // for the security UI of this tab. | 100 // for the security UI of this tab. |
| 101 NavigationControllerImpl* controller_; | 101 NavigationControllerImpl* controller_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 103 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace content | 106 } // namespace content |
| 107 | 107 |
| 108 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 108 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
| OLD | NEW |