OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "content/browser/ssl/ssl_policy_backend.h" | 13 #include "content/browser/ssl/ssl_policy_backend.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 #include "net/base/cert_status_flags.h" | 18 #include "net/base/cert_status_flags.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 | 20 |
21 class LoadFromMemoryCacheDetails; | 21 class LoadFromMemoryCacheDetails; |
22 class NavigationController; | 22 class NavigationController; |
23 class NavigationEntry; | |
24 class ResourceDispatcherHost; | 23 class ResourceDispatcherHost; |
25 class ResourceRedirectDetails; | 24 class ResourceRedirectDetails; |
26 class ResourceRequestDetails; | 25 class ResourceRequestDetails; |
27 class SSLPolicy; | 26 class SSLPolicy; |
28 | 27 |
| 28 namespace content { |
| 29 class NavigationEntryImpl; |
| 30 } |
| 31 |
29 namespace net { | 32 namespace net { |
30 class SSLInfo; | 33 class SSLInfo; |
31 class URLRequest; | 34 class URLRequest; |
32 } // namespace net | 35 } // namespace net |
33 | 36 |
34 // The SSLManager SSLManager controls the SSL UI elements in a TabContents. It | 37 // The SSLManager SSLManager controls the SSL UI elements in a TabContents. It |
35 // listens for various events that influence when these elements should or | 38 // listens for various events that influence when these elements should or |
36 // should not be displayed and adjusts them accordingly. | 39 // should not be displayed and adjusts them accordingly. |
37 // | 40 // |
38 // There is one SSLManager per tab. | 41 // There is one SSLManager per tab. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Entry points for notifications to which we subscribe. Note that | 106 // Entry points for notifications to which we subscribe. Note that |
104 // DidCommitProvisionalLoad uses the abstract NotificationDetails type since | 107 // DidCommitProvisionalLoad uses the abstract NotificationDetails type since |
105 // the type we need is in NavigationController which would create a circular | 108 // the type we need is in NavigationController which would create a circular |
106 // header file dependency. | 109 // header file dependency. |
107 void DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details); | 110 void DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details); |
108 void DidStartResourceResponse(ResourceRequestDetails* details); | 111 void DidStartResourceResponse(ResourceRequestDetails* details); |
109 void DidReceiveResourceRedirect(ResourceRedirectDetails* details); | 112 void DidReceiveResourceRedirect(ResourceRedirectDetails* details); |
110 void DidChangeSSLInternalState(); | 113 void DidChangeSSLInternalState(); |
111 | 114 |
112 // Update the NavigationEntry with our current state. | 115 // Update the NavigationEntry with our current state. |
113 void UpdateEntry(NavigationEntry* entry); | 116 void UpdateEntry(content::NavigationEntryImpl* entry); |
114 | 117 |
115 // The backend for the SSLPolicy to actuate its decisions. | 118 // The backend for the SSLPolicy to actuate its decisions. |
116 SSLPolicyBackend backend_; | 119 SSLPolicyBackend backend_; |
117 | 120 |
118 // The SSLPolicy instance for this manager. | 121 // The SSLPolicy instance for this manager. |
119 scoped_ptr<SSLPolicy> policy_; | 122 scoped_ptr<SSLPolicy> policy_; |
120 | 123 |
121 // The NavigationController that owns this SSLManager. We are responsible | 124 // The NavigationController that owns this SSLManager. We are responsible |
122 // for the security UI of this tab. | 125 // for the security UI of this tab. |
123 NavigationController* controller_; | 126 NavigationController* controller_; |
124 | 127 |
125 // Handles registering notifications with the NotificationService. | 128 // Handles registering notifications with the NotificationService. |
126 content::NotificationRegistrar registrar_; | 129 content::NotificationRegistrar registrar_; |
127 | 130 |
128 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 131 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
129 }; | 132 }; |
130 | 133 |
131 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 134 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
OLD | NEW |