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 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 void RenderFrameImpl::didChangeOpener(blink::WebFrame* opener) { | 2840 void RenderFrameImpl::didChangeOpener(blink::WebFrame* opener) { |
2841 // Only a local frame should be able to update another frame's opener. | 2841 // Only a local frame should be able to update another frame's opener. |
2842 DCHECK(!opener || opener->isWebLocalFrame()); | 2842 DCHECK(!opener || opener->isWebLocalFrame()); |
2843 | 2843 |
2844 int opener_routing_id = opener ? | 2844 int opener_routing_id = opener ? |
2845 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID() : | 2845 RenderFrameImpl::FromWebFrame(opener->toWebLocalFrame())->GetRoutingID() : |
2846 MSG_ROUTING_NONE; | 2846 MSG_ROUTING_NONE; |
2847 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); | 2847 Send(new FrameHostMsg_DidChangeOpener(routing_id_, opener_routing_id)); |
2848 } | 2848 } |
2849 | 2849 |
2850 void RenderFrameImpl::frameDetached(blink::WebFrame* frame, DetachType type) { | 2850 void RenderFrameImpl::frameDetached(blink::WebLocalFrame* frame, |
| 2851 DetachType type) { |
2851 // NOTE: This function is called on the frame that is being detached and not | 2852 // NOTE: This function is called on the frame that is being detached and not |
2852 // the parent frame. This is different from createChildFrame() which is | 2853 // the parent frame. This is different from createChildFrame() which is |
2853 // called on the parent frame. | 2854 // called on the parent frame. |
2854 DCHECK_EQ(frame_, frame); | 2855 DCHECK_EQ(frame_, frame); |
2855 | 2856 |
2856 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameDetached()); | 2857 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameDetached()); |
2857 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), | 2858 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), |
2858 FrameDetached(frame)); | 2859 FrameDetached(frame)); |
2859 | 2860 |
2860 // We only notify the browser process when the frame is being detached for | 2861 // We only notify the browser process when the frame is being detached for |
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6310 // event target. Potentially a Pepper plugin will receive the event. | 6311 // event target. Potentially a Pepper plugin will receive the event. |
6311 // In order to tell whether a plugin gets the last mouse event and which it | 6312 // In order to tell whether a plugin gets the last mouse event and which it |
6312 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6313 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6313 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6314 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6314 // |pepper_last_mouse_event_target_|. | 6315 // |pepper_last_mouse_event_target_|. |
6315 pepper_last_mouse_event_target_ = nullptr; | 6316 pepper_last_mouse_event_target_ = nullptr; |
6316 #endif | 6317 #endif |
6317 } | 6318 } |
6318 | 6319 |
6319 } // namespace content | 6320 } // namespace content |
OLD | NEW |