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 3823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3834 main_frame->document().isPluginDocument())); | 3834 main_frame->document().isPluginDocument())); |
3835 } | 3835 } |
3836 } | 3836 } |
3837 | 3837 |
3838 for (auto& observer : observers_) | 3838 for (auto& observer : observers_) |
3839 observer.DidCreateDocumentElement(); | 3839 observer.DidCreateDocumentElement(); |
3840 for (auto& observer : render_view_->observers()) | 3840 for (auto& observer : render_view_->observers()) |
3841 observer.DidCreateDocumentElement(frame); | 3841 observer.DidCreateDocumentElement(frame); |
3842 } | 3842 } |
3843 | 3843 |
3844 void RenderFrameImpl::runScriptsAtDocumentElementAvailable( | 3844 void RenderFrameImpl::runScriptsAtDocumentElementAvailable() { |
3845 blink::WebLocalFrame* frame) { | |
3846 DCHECK(!frame_ || frame_ == frame); | |
3847 base::WeakPtr<RenderFrameImpl> weak_self = weak_factory_.GetWeakPtr(); | 3845 base::WeakPtr<RenderFrameImpl> weak_self = weak_factory_.GetWeakPtr(); |
3848 | 3846 |
3849 MojoBindingsController* mojo_bindings_controller = | 3847 MojoBindingsController* mojo_bindings_controller = |
3850 MojoBindingsController::Get(this); | 3848 MojoBindingsController::Get(this); |
3851 if (mojo_bindings_controller) | 3849 if (mojo_bindings_controller) |
3852 mojo_bindings_controller->RunScriptsAtDocumentStart(); | 3850 mojo_bindings_controller->RunScriptsAtDocumentStart(); |
3853 | 3851 |
3854 if (!weak_self.get()) | 3852 if (!weak_self.get()) |
3855 return; | 3853 return; |
3856 | 3854 |
3857 GetContentClient()->renderer()->RunScriptsAtDocumentStart(this); | 3855 GetContentClient()->renderer()->RunScriptsAtDocumentStart(this); |
3858 // Do not use |this| or |frame|! ContentClient might have deleted them by now! | 3856 // Do not use |this| or |frame_|! ContentClient might have deleted them by |
| 3857 // now! |
3859 } | 3858 } |
3860 | 3859 |
3861 void RenderFrameImpl::didReceiveTitle(blink::WebLocalFrame* frame, | 3860 void RenderFrameImpl::didReceiveTitle(blink::WebLocalFrame* frame, |
3862 const blink::WebString& title, | 3861 const blink::WebString& title, |
3863 blink::WebTextDirection direction) { | 3862 blink::WebTextDirection direction) { |
3864 DCHECK_EQ(frame_, frame); | 3863 DCHECK_EQ(frame_, frame); |
3865 // Ignore all but top level navigations. | 3864 // Ignore all but top level navigations. |
3866 if (!frame->parent()) { | 3865 if (!frame->parent()) { |
3867 base::trace_event::TraceLog::GetInstance()->UpdateProcessLabel( | 3866 base::trace_event::TraceLog::GetInstance()->UpdateProcessLabel( |
3868 routing_id_, title.utf8()); | 3867 routing_id_, title.utf8()); |
(...skipping 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6969 policy(info.defaultPolicy), | 6968 policy(info.defaultPolicy), |
6970 replaces_current_history_item(info.replacesCurrentHistoryItem), | 6969 replaces_current_history_item(info.replacesCurrentHistoryItem), |
6971 history_navigation_in_new_child_frame( | 6970 history_navigation_in_new_child_frame( |
6972 info.isHistoryNavigationInNewChildFrame), | 6971 info.isHistoryNavigationInNewChildFrame), |
6973 client_redirect(info.isClientRedirect), | 6972 client_redirect(info.isClientRedirect), |
6974 cache_disabled(info.isCacheDisabled), | 6973 cache_disabled(info.isCacheDisabled), |
6975 form(info.form), | 6974 form(info.form), |
6976 source_location(info.sourceLocation) {} | 6975 source_location(info.sourceLocation) {} |
6977 | 6976 |
6978 } // namespace content | 6977 } // namespace content |
OLD | NEW |