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 #include "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 | 1026 |
1027 bool WebContentsImpl::IsBeingDestroyed() const { | 1027 bool WebContentsImpl::IsBeingDestroyed() const { |
1028 return is_being_destroyed_; | 1028 return is_being_destroyed_; |
1029 } | 1029 } |
1030 | 1030 |
1031 void WebContentsImpl::NotifyNavigationStateChanged(unsigned changed_flags) { | 1031 void WebContentsImpl::NotifyNavigationStateChanged(unsigned changed_flags) { |
1032 if (delegate_) | 1032 if (delegate_) |
1033 delegate_->NavigationStateChanged(this, changed_flags); | 1033 delegate_->NavigationStateChanged(this, changed_flags); |
1034 } | 1034 } |
1035 | 1035 |
| 1036 void WebContentsImpl::NotifyVisibleSSLStateChanged() { |
| 1037 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 1038 DidChangeVisibleSSLState()); |
| 1039 } |
| 1040 |
1036 base::TimeTicks WebContentsImpl::GetLastSelectedTime() const { | 1041 base::TimeTicks WebContentsImpl::GetLastSelectedTime() const { |
1037 return last_selected_time_; | 1042 return last_selected_time_; |
1038 } | 1043 } |
1039 | 1044 |
1040 void WebContentsImpl::WasShown() { | 1045 void WebContentsImpl::WasShown() { |
1041 controller_.SetActive(true); | 1046 controller_.SetActive(true); |
1042 RenderWidgetHostViewPort* rwhv = | 1047 RenderWidgetHostViewPort* rwhv = |
1043 RenderWidgetHostViewPort::FromRWHV(GetRenderWidgetHostView()); | 1048 RenderWidgetHostViewPort::FromRWHV(GetRenderWidgetHostView()); |
1044 if (rwhv) { | 1049 if (rwhv) { |
1045 rwhv->WasShown(); | 1050 rwhv->WasShown(); |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 | 2137 |
2133 NotificationService::current()->Notify( | 2138 NotificationService::current()->Notify( |
2134 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, | 2139 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, |
2135 Source<NavigationController>(&controller_), | 2140 Source<NavigationController>(&controller_), |
2136 Details<LoadFromMemoryCacheDetails>(&details)); | 2141 Details<LoadFromMemoryCacheDetails>(&details)); |
2137 } | 2142 } |
2138 | 2143 |
2139 void WebContentsImpl::OnDidDisplayInsecureContent() { | 2144 void WebContentsImpl::OnDidDisplayInsecureContent() { |
2140 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); | 2145 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); |
2141 displayed_insecure_content_ = true; | 2146 displayed_insecure_content_ = true; |
2142 SSLManager::NotifySSLInternalStateChanged(&GetController()); | 2147 controller_.ssl_manager()->DidDisplayInsecureContent(); |
2143 } | 2148 } |
2144 | 2149 |
2145 void WebContentsImpl::OnDidRunInsecureContent( | 2150 void WebContentsImpl::OnDidRunInsecureContent( |
2146 const std::string& security_origin, const GURL& target_url) { | 2151 const std::string& security_origin, const GURL& target_url) { |
2147 LOG(INFO) << security_origin << " ran insecure content from " | 2152 LOG(INFO) << security_origin << " ran insecure content from " |
2148 << target_url.possibly_invalid_spec(); | 2153 << target_url.possibly_invalid_spec(); |
2149 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); | 2154 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); |
2150 if (EndsWith(security_origin, kDotGoogleDotCom, false)) | 2155 if (EndsWith(security_origin, kDotGoogleDotCom, false)) |
2151 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); | 2156 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); |
2152 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 2157 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
2153 displayed_insecure_content_ = true; | 2158 displayed_insecure_content_ = true; |
2154 SSLManager::NotifySSLInternalStateChanged(&GetController()); | |
2155 } | 2159 } |
2156 | 2160 |
2157 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { | 2161 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { |
2158 controller_.DocumentLoadedInFrame(); | 2162 controller_.DocumentLoadedInFrame(); |
2159 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2163 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2160 DocumentLoadedInFrame(frame_id, message_source_)); | 2164 DocumentLoadedInFrame(frame_id, message_source_)); |
2161 } | 2165 } |
2162 | 2166 |
2163 void WebContentsImpl::OnDidFinishLoad( | 2167 void WebContentsImpl::OnDidFinishLoad( |
2164 int64 frame_id, | 2168 int64 frame_id, |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3430 | 3434 |
3431 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3435 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3432 return browser_plugin_guest_.get(); | 3436 return browser_plugin_guest_.get(); |
3433 } | 3437 } |
3434 | 3438 |
3435 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3439 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3436 return browser_plugin_embedder_.get(); | 3440 return browser_plugin_embedder_.get(); |
3437 } | 3441 } |
3438 | 3442 |
3439 } // namespace content | 3443 } // namespace content |
OLD | NEW |