| 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 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2844 DetachType type) { | 2844 DetachType type) { |
| 2845 // NOTE: This function is called on the frame that is being detached and not | 2845 // NOTE: This function is called on the frame that is being detached and not |
| 2846 // the parent frame. This is different from createChildFrame() which is | 2846 // the parent frame. This is different from createChildFrame() which is |
| 2847 // called on the parent frame. | 2847 // called on the parent frame. |
| 2848 DCHECK_EQ(frame_, frame); | 2848 DCHECK_EQ(frame_, frame); |
| 2849 | 2849 |
| 2850 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameDetached()); | 2850 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameDetached()); |
| 2851 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), | 2851 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), |
| 2852 FrameDetached(frame)); | 2852 FrameDetached(frame)); |
| 2853 | 2853 |
| 2854 // Send a state update before the frame is detached. |
| 2855 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) |
| 2856 SendUpdateState(); |
| 2857 |
| 2854 // We only notify the browser process when the frame is being detached for | 2858 // We only notify the browser process when the frame is being detached for |
| 2855 // removal and it was initiated from the renderer process. | 2859 // removal and it was initiated from the renderer process. |
| 2856 if (!in_browser_initiated_detach_ && type == DetachType::Remove) | 2860 if (!in_browser_initiated_detach_ && type == DetachType::Remove) |
| 2857 Send(new FrameHostMsg_Detach(routing_id_)); | 2861 Send(new FrameHostMsg_Detach(routing_id_)); |
| 2858 | 2862 |
| 2859 // Clean up the associated RenderWidget for the frame, if there is one. | 2863 // Clean up the associated RenderWidget for the frame, if there is one. |
| 2860 if (render_widget_) { | 2864 if (render_widget_) { |
| 2861 render_widget_->UnregisterRenderFrame(this); | 2865 render_widget_->UnregisterRenderFrame(this); |
| 2862 render_widget_->CloseForFrame(); | 2866 render_widget_->CloseForFrame(); |
| 2863 } | 2867 } |
| (...skipping 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6334 // event target. Potentially a Pepper plugin will receive the event. | 6338 // event target. Potentially a Pepper plugin will receive the event. |
| 6335 // In order to tell whether a plugin gets the last mouse event and which it | 6339 // In order to tell whether a plugin gets the last mouse event and which it |
| 6336 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6340 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6337 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6341 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6338 // |pepper_last_mouse_event_target_|. | 6342 // |pepper_last_mouse_event_target_|. |
| 6339 pepper_last_mouse_event_target_ = nullptr; | 6343 pepper_last_mouse_event_target_ = nullptr; |
| 6340 #endif | 6344 #endif |
| 6341 } | 6345 } |
| 6342 | 6346 |
| 6343 } // namespace content | 6347 } // namespace content |
| OLD | NEW |