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 #include "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 995 |
996 NotificationService::current()->Notify( | 996 NotificationService::current()->Notify( |
997 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, | 997 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, |
998 Source<NavigationController>(&controller_), | 998 Source<NavigationController>(&controller_), |
999 Details<LoadFromMemoryCacheDetails>(&details)); | 999 Details<LoadFromMemoryCacheDetails>(&details)); |
1000 } | 1000 } |
1001 | 1001 |
1002 void TabContents::OnDidDisplayInsecureContent() { | 1002 void TabContents::OnDidDisplayInsecureContent() { |
1003 UserMetrics::RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); | 1003 UserMetrics::RecordAction(UserMetricsAction("SSL.DisplayedInsecureContent")); |
1004 displayed_insecure_content_ = true; | 1004 displayed_insecure_content_ = true; |
1005 SSLManager::NotifySSLInternalStateChanged(&controller()); | 1005 SSLManager::NotifySSLInternalStateChanged(); |
1006 } | 1006 } |
1007 | 1007 |
1008 void TabContents::OnDidRunInsecureContent( | 1008 void TabContents::OnDidRunInsecureContent( |
1009 const std::string& security_origin, const GURL& target_url) { | 1009 const std::string& security_origin, const GURL& target_url) { |
1010 LOG(INFO) << security_origin << " ran insecure content from " | 1010 LOG(INFO) << security_origin << " ran insecure content from " |
1011 << target_url.possibly_invalid_spec(); | 1011 << target_url.possibly_invalid_spec(); |
1012 UserMetrics::RecordAction(UserMetricsAction("SSL.RanInsecureContent")); | 1012 UserMetrics::RecordAction(UserMetricsAction("SSL.RanInsecureContent")); |
1013 if (EndsWith(security_origin, kDotGoogleDotCom, false)) { | 1013 if (EndsWith(security_origin, kDotGoogleDotCom, false)) { |
1014 UserMetrics::RecordAction( | 1014 UserMetrics::RecordAction( |
1015 UserMetricsAction("SSL.RanInsecureContentGoogle")); | 1015 UserMetricsAction("SSL.RanInsecureContentGoogle")); |
1016 } | 1016 } |
1017 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 1017 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
1018 displayed_insecure_content_ = true; | 1018 displayed_insecure_content_ = true; |
1019 SSLManager::NotifySSLInternalStateChanged(&controller()); | 1019 SSLManager::NotifySSLInternalStateChanged(); |
1020 } | 1020 } |
1021 | 1021 |
1022 void TabContents::OnDocumentLoadedInFrame(int64 frame_id) { | 1022 void TabContents::OnDocumentLoadedInFrame(int64 frame_id) { |
1023 controller_.DocumentLoadedInFrame(); | 1023 controller_.DocumentLoadedInFrame(); |
1024 FOR_EACH_OBSERVER(TabContentsObserver, observers_, | 1024 FOR_EACH_OBSERVER(TabContentsObserver, observers_, |
1025 DocumentLoadedInFrame(frame_id)); | 1025 DocumentLoadedInFrame(frame_id)); |
1026 } | 1026 } |
1027 | 1027 |
1028 void TabContents::OnDidFinishLoad(int64 frame_id) { | 1028 void TabContents::OnDidFinishLoad(int64 frame_id) { |
1029 FOR_EACH_OBSERVER(TabContentsObserver, observers_, | 1029 FOR_EACH_OBSERVER(TabContentsObserver, observers_, |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 } | 1904 } |
1905 | 1905 |
1906 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 1906 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
1907 render_manager_.SwapInRenderViewHost(rvh); | 1907 render_manager_.SwapInRenderViewHost(rvh); |
1908 } | 1908 } |
1909 | 1909 |
1910 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1910 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
1911 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1911 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
1912 rwh_view->SetSize(view()->GetContainerSize()); | 1912 rwh_view->SetSize(view()->GetContainerSize()); |
1913 } | 1913 } |
OLD | NEW |