OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3796 | 3796 |
3797 void RenderFrameImpl::DidCreateNewDocument(blink::WebLocalFrame* frame) { | 3797 void RenderFrameImpl::DidCreateNewDocument(blink::WebLocalFrame* frame) { |
3798 DCHECK(!frame_ || frame_ == frame); | 3798 DCHECK(!frame_ || frame_ == frame); |
3799 | 3799 |
3800 for (auto& observer : observers_) | 3800 for (auto& observer : observers_) |
3801 observer.DidCreateNewDocument(); | 3801 observer.DidCreateNewDocument(); |
3802 for (auto& observer : render_view_->observers()) | 3802 for (auto& observer : render_view_->observers()) |
3803 observer.DidCreateNewDocument(frame); | 3803 observer.DidCreateNewDocument(frame); |
3804 } | 3804 } |
3805 | 3805 |
3806 void RenderFrameImpl::DidClearWindowObject(blink::WebLocalFrame* frame) { | 3806 void RenderFrameImpl::DidClearWindowObject() { |
3807 DCHECK_EQ(frame_, frame); | |
3808 | |
3809 if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) | 3807 if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) |
3810 WebUIExtension::Install(frame); | 3808 WebUIExtension::Install(frame_); |
3811 | 3809 |
3812 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) | 3810 if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) |
3813 DomAutomationController::Install(this, frame); | 3811 DomAutomationController::Install(this, frame_); |
3814 | 3812 |
3815 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) | 3813 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) |
3816 StatsCollectionController::Install(frame); | 3814 StatsCollectionController::Install(frame_); |
3817 | 3815 |
3818 const base::CommandLine& command_line = | 3816 const base::CommandLine& command_line = |
3819 *base::CommandLine::ForCurrentProcess(); | 3817 *base::CommandLine::ForCurrentProcess(); |
3820 | 3818 |
3821 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) | 3819 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) |
3822 GpuBenchmarking::Install(frame); | 3820 GpuBenchmarking::Install(frame_); |
3823 | 3821 |
3824 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) | 3822 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) |
3825 SkiaBenchmarking::Install(frame); | 3823 SkiaBenchmarking::Install(frame_); |
3826 | 3824 |
3827 for (auto& observer : render_view_->observers()) | 3825 for (auto& observer : render_view_->observers()) |
3828 observer.DidClearWindowObject(frame); | 3826 observer.DidClearWindowObject(frame_); |
3829 for (auto& observer : observers_) | 3827 for (auto& observer : observers_) |
3830 observer.DidClearWindowObject(); | 3828 observer.DidClearWindowObject(); |
3831 } | 3829 } |
3832 | 3830 |
3833 void RenderFrameImpl::DidCreateDocumentElement(blink::WebLocalFrame* frame) { | 3831 void RenderFrameImpl::DidCreateDocumentElement(blink::WebLocalFrame* frame) { |
3834 DCHECK(!frame_ || frame_ == frame); | 3832 DCHECK(!frame_ || frame_ == frame); |
3835 | 3833 |
3836 // Notify the browser about non-blank documents loading in the top frame. | 3834 // Notify the browser about non-blank documents loading in the top frame. |
3837 GURL url = frame->GetDocument().Url(); | 3835 GURL url = frame->GetDocument().Url(); |
3838 if (url.is_valid() && url.spec() != url::kAboutBlankURL) { | 3836 if (url.is_valid() && url.spec() != url::kAboutBlankURL) { |
(...skipping 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7002 policy(info.default_policy), | 7000 policy(info.default_policy), |
7003 replaces_current_history_item(info.replaces_current_history_item), | 7001 replaces_current_history_item(info.replaces_current_history_item), |
7004 history_navigation_in_new_child_frame( | 7002 history_navigation_in_new_child_frame( |
7005 info.is_history_navigation_in_new_child_frame), | 7003 info.is_history_navigation_in_new_child_frame), |
7006 client_redirect(info.is_client_redirect), | 7004 client_redirect(info.is_client_redirect), |
7007 cache_disabled(info.is_cache_disabled), | 7005 cache_disabled(info.is_cache_disabled), |
7008 form(info.form), | 7006 form(info.form), |
7009 source_location(info.source_location) {} | 7007 source_location(info.source_location) {} |
7010 | 7008 |
7011 } // namespace content | 7009 } // namespace content |
OLD | NEW |