| 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 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2811 static_cast<NavigationStateImpl*>(document_state->navigation_state()); | 2811 static_cast<NavigationStateImpl*>(document_state->navigation_state()); |
| 2812 | 2812 |
| 2813 if (!navigation_state->request_committed()) { | 2813 if (!navigation_state->request_committed()) { |
| 2814 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); | 2814 Send(new FrameHostMsg_DidAccessInitialDocument(routing_id_)); |
| 2815 } | 2815 } |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 has_accessed_initial_document_ = true; | 2818 has_accessed_initial_document_ = true; |
| 2819 } | 2819 } |
| 2820 | 2820 |
| 2821 blink::WebFrame* RenderFrameImpl::createChildFrame( | 2821 blink::WebLocalFrame* RenderFrameImpl::createChildFrame( |
| 2822 blink::WebLocalFrame* parent, | 2822 blink::WebLocalFrame* parent, |
| 2823 blink::WebTreeScopeType scope, | 2823 blink::WebTreeScopeType scope, |
| 2824 const blink::WebString& name, | 2824 const blink::WebString& name, |
| 2825 const blink::WebString& unique_name, | 2825 const blink::WebString& unique_name, |
| 2826 blink::WebSandboxFlags sandbox_flags, | 2826 blink::WebSandboxFlags sandbox_flags, |
| 2827 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 2827 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
| 2828 // Synchronously notify the browser of a child frame creation to get the | 2828 // Synchronously notify the browser of a child frame creation to get the |
| 2829 // routing_id for the RenderFrame. | 2829 // routing_id for the RenderFrame. |
| 2830 int child_routing_id = MSG_ROUTING_NONE; | 2830 int child_routing_id = MSG_ROUTING_NONE; |
| 2831 FrameHostMsg_CreateChildFrame_Params params; | 2831 FrameHostMsg_CreateChildFrame_Params params; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2935 frame_ = nullptr; | 2935 frame_ = nullptr; |
| 2936 | 2936 |
| 2937 delete this; | 2937 delete this; |
| 2938 // Object is invalid after this point. | 2938 // Object is invalid after this point. |
| 2939 } | 2939 } |
| 2940 | 2940 |
| 2941 void RenderFrameImpl::frameFocused() { | 2941 void RenderFrameImpl::frameFocused() { |
| 2942 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 2942 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 2943 } | 2943 } |
| 2944 | 2944 |
| 2945 void RenderFrameImpl::willClose(blink::WebFrame* frame) { | 2945 void RenderFrameImpl::willCommitProvisionalLoad(blink::WebLocalFrame* frame) { |
| 2946 DCHECK_EQ(frame_, frame); | 2946 DCHECK_EQ(frame_, frame); |
| 2947 | 2947 |
| 2948 // TODO(dcheng): Rename observer to FrameWillCommitProvisionalLoad. |
| 2948 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameWillClose()); | 2949 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameWillClose()); |
| 2949 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), | 2950 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), |
| 2950 FrameWillClose(frame)); | 2951 FrameWillClose(frame)); |
| 2951 } | 2952 } |
| 2952 | 2953 |
| 2953 void RenderFrameImpl::didChangeName(const blink::WebString& name, | 2954 void RenderFrameImpl::didChangeName(const blink::WebString& name, |
| 2954 const blink::WebString& unique_name) { | 2955 const blink::WebString& unique_name) { |
| 2955 // TODO(alexmos): According to https://crbug.com/169110, sending window.name | 2956 // TODO(alexmos): According to https://crbug.com/169110, sending window.name |
| 2956 // updates may have performance implications for benchmarks like SunSpider. | 2957 // updates may have performance implications for benchmarks like SunSpider. |
| 2957 // For now, send these updates only for --site-per-process, which needs to | 2958 // For now, send these updates only for --site-per-process, which needs to |
| (...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6431 // event target. Potentially a Pepper plugin will receive the event. | 6432 // event target. Potentially a Pepper plugin will receive the event. |
| 6432 // In order to tell whether a plugin gets the last mouse event and which it | 6433 // In order to tell whether a plugin gets the last mouse event and which it |
| 6433 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6434 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6434 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6435 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6435 // |pepper_last_mouse_event_target_|. | 6436 // |pepper_last_mouse_event_target_|. |
| 6436 pepper_last_mouse_event_target_ = nullptr; | 6437 pepper_last_mouse_event_target_ = nullptr; |
| 6437 #endif | 6438 #endif |
| 6438 } | 6439 } |
| 6439 | 6440 |
| 6440 } // namespace content | 6441 } // namespace content |
| OLD | NEW |