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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2218 | 2218 |
2219 NotificationService::current()->Notify( | 2219 NotificationService::current()->Notify( |
2220 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, | 2220 NOTIFICATION_LOAD_FROM_MEMORY_CACHE, |
2221 Source<NavigationController>(&controller_), | 2221 Source<NavigationController>(&controller_), |
2222 Details<LoadFromMemoryCacheDetails>(&details)); | 2222 Details<LoadFromMemoryCacheDetails>(&details)); |
2223 } | 2223 } |
2224 | 2224 |
2225 void WebContentsImpl::OnDidDisplayInsecureContent() { | 2225 void WebContentsImpl::OnDidDisplayInsecureContent() { |
2226 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); | 2226 RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); |
2227 displayed_insecure_content_ = true; | 2227 displayed_insecure_content_ = true; |
2228 SSLManager::NotifySSLInternalStateChanged(&GetController()); | 2228 SSLManager::NotifySSLInternalStateChanged( |
| 2229 GetController().GetBrowserContext()); |
2229 } | 2230 } |
2230 | 2231 |
2231 void WebContentsImpl::OnDidRunInsecureContent( | 2232 void WebContentsImpl::OnDidRunInsecureContent( |
2232 const std::string& security_origin, const GURL& target_url) { | 2233 const std::string& security_origin, const GURL& target_url) { |
2233 LOG(INFO) << security_origin << " ran insecure content from " | 2234 LOG(INFO) << security_origin << " ran insecure content from " |
2234 << target_url.possibly_invalid_spec(); | 2235 << target_url.possibly_invalid_spec(); |
2235 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); | 2236 RecordAction(UserMetricsAction("SSL.RanInsecureContent")); |
2236 if (EndsWith(security_origin, kDotGoogleDotCom, false)) | 2237 if (EndsWith(security_origin, kDotGoogleDotCom, false)) |
2237 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); | 2238 RecordAction(UserMetricsAction("SSL.RanInsecureContentGoogle")); |
2238 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 2239 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
2239 displayed_insecure_content_ = true; | 2240 displayed_insecure_content_ = true; |
2240 SSLManager::NotifySSLInternalStateChanged(&GetController()); | 2241 SSLManager::NotifySSLInternalStateChanged( |
| 2242 GetController().GetBrowserContext()); |
2241 } | 2243 } |
2242 | 2244 |
2243 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { | 2245 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { |
2244 controller_.DocumentLoadedInFrame(); | 2246 controller_.DocumentLoadedInFrame(); |
2245 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2247 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2246 DocumentLoadedInFrame(frame_id, message_source_)); | 2248 DocumentLoadedInFrame(frame_id, message_source_)); |
2247 } | 2249 } |
2248 | 2250 |
2249 void WebContentsImpl::OnDidFinishLoad( | 2251 void WebContentsImpl::OnDidFinishLoad( |
2250 int64 frame_id, | 2252 int64 frame_id, |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2507 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2509 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2508 FrameDetached(message_source_, frame_id)); | 2510 FrameDetached(message_source_, frame_id)); |
2509 } | 2511 } |
2510 | 2512 |
2511 void WebContentsImpl::DidBlock3DAPIs(const GURL& url, | 2513 void WebContentsImpl::DidBlock3DAPIs(const GURL& url, |
2512 ThreeDAPIType requester) { | 2514 ThreeDAPIType requester) { |
2513 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2515 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2514 DidBlock3DAPIs(url, requester)); | 2516 DidBlock3DAPIs(url, requester)); |
2515 } | 2517 } |
2516 | 2518 |
| 2519 void WebContentsImpl::DidChangeVisibleSSLState() { |
| 2520 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2521 DidChangeVisibleSSLState()); |
| 2522 } |
| 2523 |
2517 // Notifies the RenderWidgetHost instance about the fact that the page is | 2524 // Notifies the RenderWidgetHost instance about the fact that the page is |
2518 // loading, or done loading and calls the base implementation. | 2525 // loading, or done loading and calls the base implementation. |
2519 void WebContentsImpl::SetIsLoading(bool is_loading, | 2526 void WebContentsImpl::SetIsLoading(bool is_loading, |
2520 LoadNotificationDetails* details) { | 2527 LoadNotificationDetails* details) { |
2521 if (is_loading == is_loading_) | 2528 if (is_loading == is_loading_) |
2522 return; | 2529 return; |
2523 | 2530 |
2524 if (!is_loading) { | 2531 if (!is_loading) { |
2525 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); | 2532 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); |
2526 load_state_host_.clear(); | 2533 load_state_host_.clear(); |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3532 | 3539 |
3533 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 3540 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
3534 return browser_plugin_guest_.get(); | 3541 return browser_plugin_guest_.get(); |
3535 } | 3542 } |
3536 | 3543 |
3537 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { | 3544 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { |
3538 return browser_plugin_embedder_.get(); | 3545 return browser_plugin_embedder_.get(); |
3539 } | 3546 } |
3540 | 3547 |
3541 } // namespace content | 3548 } // namespace content |
OLD | NEW |