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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1181 // Ensure the RenderView doesn't point to this object, once it is destroyed. | 1181 // Ensure the RenderView doesn't point to this object, once it is destroyed. |
1182 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| | 1182 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| |
1183 // is |this|, once the object is no longer leaked. | 1183 // is |this|, once the object is no longer leaked. |
1184 // See https://crbug.com/464764. | 1184 // See https://crbug.com/464764. |
1185 render_view_->main_render_frame_ = nullptr; | 1185 render_view_->main_render_frame_ = nullptr; |
1186 } | 1186 } |
1187 | 1187 |
1188 render_view_->UnregisterRenderFrame(this); | 1188 render_view_->UnregisterRenderFrame(this); |
1189 g_routing_id_frame_map.Get().erase(routing_id_); | 1189 g_routing_id_frame_map.Get().erase(routing_id_); |
1190 RenderThread::Get()->RemoveRoute(routing_id_); | 1190 RenderThread::Get()->RemoveRoute(routing_id_); |
1191 | |
1192 if (screen_orientation_dispatcher_) { | |
blundell
2016/10/25 16:09:27
why this added code?
lunalu1
2016/11/03 23:15:25
Done.
| |
1193 delete screen_orientation_dispatcher_; | |
1194 screen_orientation_dispatcher_ = nullptr; | |
1195 } | |
1191 } | 1196 } |
1192 | 1197 |
1193 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) { | 1198 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) { |
1194 DCHECK(!frame_); | 1199 DCHECK(!frame_); |
1195 | 1200 |
1196 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( | 1201 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( |
1197 std::make_pair(web_frame, this)); | 1202 std::make_pair(web_frame, this)); |
1198 CHECK(result.second) << "Inserting a duplicate item."; | 1203 CHECK(result.second) << "Inserting a duplicate item."; |
1199 | 1204 |
1200 frame_ = web_frame; | 1205 frame_ = web_frame; |
(...skipping 5368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6569 // event target. Potentially a Pepper plugin will receive the event. | 6574 // event target. Potentially a Pepper plugin will receive the event. |
6570 // In order to tell whether a plugin gets the last mouse event and which it | 6575 // In order to tell whether a plugin gets the last mouse event and which it |
6571 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6576 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6572 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6577 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6573 // |pepper_last_mouse_event_target_|. | 6578 // |pepper_last_mouse_event_target_|. |
6574 pepper_last_mouse_event_target_ = nullptr; | 6579 pepper_last_mouse_event_target_ = nullptr; |
6575 #endif | 6580 #endif |
6576 } | 6581 } |
6577 | 6582 |
6578 } // namespace content | 6583 } // namespace content |
OLD | NEW |