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 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2154 | 2154 |
2155 NotificationService::current()->Notify( | 2155 NotificationService::current()->Notify( |
2156 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, | 2156 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, |
2157 Source<NavigationController>(&controller_), | 2157 Source<NavigationController>(&controller_), |
2158 Details<LoadFromMemoryCacheDetails>(&details)); | 2158 Details<LoadFromMemoryCacheDetails>(&details)); |
2159 } | 2159 } |
2160 | 2160 |
2161 void WebContentsImpl::OnDidDisplayInsecureContent() { | 2161 void WebContentsImpl::OnDidDisplayInsecureContent() { |
2162 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); | 2162 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); |
2163 displayed_insecure_content_ = true; | 2163 displayed_insecure_content_ = true; |
2164 SSLManager::NotifySSLInternalStateChanged(&GetController()); | 2164 controller_.ssl_manager()->DidDisplayInsecureContent(); |
2165 } | 2165 } |
2166 | 2166 |
2167 void WebContentsImpl::OnDidRunInsecureContent( | 2167 void WebContentsImpl::OnDidRunInsecureContent( |
2168 const std::string& security_origin, const GURL& target_url) { | 2168 const std::string& security_origin, const GURL& target_url) { |
2169 LOG(INFO) << security_origin << " ran insecure content from " | 2169 LOG(INFO) << security_origin << " ran insecure content from " |
2170 << target_url.possibly_invalid_spec(); | 2170 << target_url.possibly_invalid_spec(); |
2171 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); | 2171 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); |
2172 if (EndsWith(security_origin, kDotGoogleDotCom, false)) | 2172 if (EndsWith(security_origin, kDotGoogleDotCom, false)) |
2173 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); | 2173 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); |
2174 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 2174 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
2175 displayed_insecure_content_ = true; | 2175 displayed_insecure_content_ = true; |
2176 SSLManager::NotifySSLInternalStateChanged(&GetController()); | |
2177 } | 2176 } |
2178 | 2177 |
2179 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { | 2178 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { |
2180 controller_.DocumentLoadedInFrame(); | 2179 controller_.DocumentLoadedInFrame(); |
2181 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2180 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2182 DocumentLoadedInFrame(frame_id, message_source_)); | 2181 DocumentLoadedInFrame(frame_id, message_source_)); |
2183 } | 2182 } |
2184 | 2183 |
2185 void WebContentsImpl::OnDidFinishLoad( | 2184 void WebContentsImpl::OnDidFinishLoad( |
2186 int64 frame_id, | 2185 int64 frame_id, |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2439 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2441 FrameDetached(message_source_, frame_id)); | 2440 FrameDetached(message_source_, frame_id)); |
2442 } | 2441 } |
2443 | 2442 |
2444 void WebContentsImpl::DidBlock3DAPIs(const GURL& url, | 2443 void WebContentsImpl::DidBlock3DAPIs(const GURL& url, |
2445 ThreeDAPIType requester) { | 2444 ThreeDAPIType requester) { |
2446 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2445 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2447 DidBlock3DAPIs(url, requester)); | 2446 DidBlock3DAPIs(url, requester)); |
2448 } | 2447 } |
2449 | 2448 |
| 2449 void WebContentsImpl::DidChangeVisibleSSLState() { |
| 2450 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2451 DidChangeVisibleSSLState()); |
| 2452 } |
| 2453 |
2450 // Notifies the RenderWidgetHost instance about the fact that the page is | 2454 // Notifies the RenderWidgetHost instance about the fact that the page is |
2451 // loading, or done loading and calls the base implementation. | 2455 // loading, or done loading and calls the base implementation. |
2452 void WebContentsImpl::SetIsLoading(bool is_loading, | 2456 void WebContentsImpl::SetIsLoading(bool is_loading, |
2453 LoadNotificationDetails* details) { | 2457 LoadNotificationDetails* details) { |
2454 if (is_loading == is_loading_) | 2458 if (is_loading == is_loading_) |
2455 return; | 2459 return; |
2456 | 2460 |
2457 if (!is_loading) { | 2461 if (!is_loading) { |
2458 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); | 2462 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); |
2459 load_state_host_.clear(); | 2463 load_state_host_.clear(); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3452 | 3456 |
3453 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3457 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3454 return browser_plugin_guest_.get(); | 3458 return browser_plugin_guest_.get(); |
3455 } | 3459 } |
3456 | 3460 |
3457 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3461 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3458 return browser_plugin_embedder_.get(); | 3462 return browser_plugin_embedder_.get(); |
3459 } | 3463 } |
3460 | 3464 |
3461 } // namespace content | 3465 } // namespace content |
OLD | NEW |