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; | |
35 | 34 |
36 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It | 35 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It |
37 // listens for various events that influence when these elements should or | 36 // listens for various events that influence when these elements should or |
38 // should not be displayed and adjusts them accordingly. | 37 // should not be displayed and adjusts them accordingly. |
39 // | 38 // |
40 // There is one SSLManager per tab. | 39 // There is one SSLManager per tab. |
41 // The security state (secure/insecure) is stored in the navigation entry. | 40 // The security state (secure/insecure) is stored in the navigation entry. |
42 // Along with it are stored any SSL error code and the associated cert. | 41 // Along with it are stored any SSL error code and the associated cert. |
43 | 42 |
44 class CONTENT_EXPORT SSLManager { | 43 class CONTENT_EXPORT SSLManager { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // The navigation controller associated with this SSLManager. The | 81 // The navigation controller associated with this SSLManager. The |
83 // NavigationController is guaranteed to outlive the SSLManager. | 82 // NavigationController is guaranteed to outlive the SSLManager. |
84 NavigationControllerImpl* controller() { return controller_; } | 83 NavigationControllerImpl* controller() { return controller_; } |
85 | 84 |
86 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); | 85 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); |
87 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); | 86 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); |
88 void DidStartResourceResponse(const ResourceRequestDetails& details); | 87 void DidStartResourceResponse(const ResourceRequestDetails& details); |
89 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); | 88 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); |
90 | 89 |
91 // Insecure content entry point. | 90 // Insecure content entry point. |
92 void DidRunInsecureContent(const GURL& security_origin); | 91 void DidDisplayInsecureContent(); |
| 92 void DidRunInsecureContent(const std::string& security_origin); |
93 | 93 |
94 private: | 94 private: |
95 // Updates the NavigationEntry with our current state. This will | 95 // Updates the NavigationEntry with our current state. This will |
96 // notify the WebContents of an SSL state change if a change was | 96 // notify the WebContents of an SSL state change if a change was |
97 // actually made. | 97 // actually made. |
98 void UpdateEntry(NavigationEntryImpl* entry); | 98 void UpdateEntry(NavigationEntryImpl* entry); |
99 | 99 |
100 // Notifies the WebContents that the SSL state changed. | 100 // Notifies the WebContents that the SSL state changed. |
101 void NotifyDidChangeVisibleSSLState(); | 101 void NotifyDidChangeVisibleSSLState(); |
102 | 102 |
103 // The backend for the SSLPolicy to actuate its decisions. | 103 // The backend for the SSLPolicy to actuate its decisions. |
104 SSLPolicyBackend backend_; | 104 SSLPolicyBackend backend_; |
105 | 105 |
106 // The SSLPolicy instance for this manager. | 106 // The SSLPolicy instance for this manager. |
107 scoped_ptr<SSLPolicy> policy_; | 107 scoped_ptr<SSLPolicy> policy_; |
108 | 108 |
109 // The NavigationController that owns this SSLManager. We are responsible | 109 // The NavigationController that owns this SSLManager. We are responsible |
110 // for the security UI of this tab. | 110 // for the security UI of this tab. |
111 NavigationControllerImpl* controller_; | 111 NavigationControllerImpl* controller_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 113 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
117 | 117 |
118 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 118 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
OLD | NEW |