Chromium Code Reviews| 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1034 #if defined(OS_ANDROID) | 1034 #if defined(OS_ANDROID) |
| 1035 new GinJavaBridgeDispatcher(this); | 1035 new GinJavaBridgeDispatcher(this); |
| 1036 #endif | 1036 #endif |
| 1037 | 1037 |
| 1038 #if defined(ENABLE_PLUGINS) | 1038 #if defined(ENABLE_PLUGINS) |
| 1039 // Manages its own lifetime. | 1039 // Manages its own lifetime. |
| 1040 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this); | 1040 plugin_power_saver_helper_ = new PluginPowerSaverHelper(this); |
| 1041 #endif | 1041 #endif |
| 1042 | 1042 |
| 1043 manifest_manager_ = new ManifestManager(this); | 1043 manifest_manager_ = new ManifestManager(this); |
| 1044 | |
| 1045 TRACE_EVENT_OBJECT_CREATED_WITH_ID( | |
|
Sami
2016/03/02 00:29:01
Once my part lands we don't need the changes in th
benjhayden
2016/03/02 18:53:03
Right :-)
The changes in this file are just so tha
| |
| 1046 "navigation", "RenderFrame", | |
| 1047 TRACE_ID_WITH_SCOPE("RenderFrame", routing_id_)); | |
| 1048 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( | |
| 1049 "navigation", "RenderFrame", | |
| 1050 TRACE_ID_WITH_SCOPE("RenderFrame", routing_id_), ""); | |
| 1044 } | 1051 } |
| 1045 | 1052 |
| 1046 RenderFrameImpl::~RenderFrameImpl() { | 1053 RenderFrameImpl::~RenderFrameImpl() { |
| 1047 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); | 1054 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); |
| 1048 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct()); | 1055 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct()); |
| 1049 | 1056 |
| 1050 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_); | 1057 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_); |
| 1051 | 1058 |
| 1052 #if defined(VIDEO_HOLE) | 1059 #if defined(VIDEO_HOLE) |
| 1053 if (contains_media_player_) | 1060 if (contains_media_player_) |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 1069 // Ensure the RenderView doesn't point to this object, once it is destroyed. | 1076 // Ensure the RenderView doesn't point to this object, once it is destroyed. |
| 1070 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| | 1077 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| |
| 1071 // is |this|, once the object is no longer leaked. | 1078 // is |this|, once the object is no longer leaked. |
| 1072 // See https://crbug.com/464764. | 1079 // See https://crbug.com/464764. |
| 1073 render_view_->main_render_frame_ = nullptr; | 1080 render_view_->main_render_frame_ = nullptr; |
| 1074 } | 1081 } |
| 1075 | 1082 |
| 1076 render_view_->UnregisterRenderFrame(this); | 1083 render_view_->UnregisterRenderFrame(this); |
| 1077 g_routing_id_frame_map.Get().erase(routing_id_); | 1084 g_routing_id_frame_map.Get().erase(routing_id_); |
| 1078 RenderThread::Get()->RemoveRoute(routing_id_); | 1085 RenderThread::Get()->RemoveRoute(routing_id_); |
| 1086 | |
| 1087 TRACE_EVENT_OBJECT_DELETED_WITH_ID( | |
| 1088 "navigation", "RenderFrame", | |
| 1089 TRACE_ID_WITH_SCOPE("RenderFrame", routing_id_)); | |
| 1079 } | 1090 } |
| 1080 | 1091 |
| 1081 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) { | 1092 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) { |
| 1082 DCHECK(!frame_); | 1093 DCHECK(!frame_); |
| 1083 | 1094 |
| 1084 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( | 1095 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( |
| 1085 std::make_pair(web_frame, this)); | 1096 std::make_pair(web_frame, this)); |
| 1086 CHECK(result.second) << "Inserting a duplicate item."; | 1097 CHECK(result.second) << "Inserting a duplicate item."; |
| 1087 | 1098 |
| 1088 frame_ = web_frame; | 1099 frame_ = web_frame; |
| (...skipping 5014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6103 int match_count, | 6114 int match_count, |
| 6104 int ordinal, | 6115 int ordinal, |
| 6105 const WebRect& selection_rect, | 6116 const WebRect& selection_rect, |
| 6106 bool final_status_update) { | 6117 bool final_status_update) { |
| 6107 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6118 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6108 selection_rect, ordinal, | 6119 selection_rect, ordinal, |
| 6109 final_status_update)); | 6120 final_status_update)); |
| 6110 } | 6121 } |
| 6111 | 6122 |
| 6112 } // namespace content | 6123 } // namespace content |
| OLD | NEW |