Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1517)

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 1409693009: Fix leaking of RenderFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on ToT and couple of more nits fixes. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 // 700 //
701 // The documentation for these functions should be in 701 // The documentation for these functions should be in
702 // content/common/*_messages.h for the message that the function is handling. 702 // content/common/*_messages.h for the message that the function is handling.
703 void OnNavigate(const CommonNavigationParams& common_params, 703 void OnNavigate(const CommonNavigationParams& common_params,
704 const StartNavigationParams& start_params, 704 const StartNavigationParams& start_params,
705 const RequestNavigationParams& request_params); 705 const RequestNavigationParams& request_params);
706 void OnBeforeUnload(); 706 void OnBeforeUnload();
707 void OnSwapOut(int proxy_routing_id, 707 void OnSwapOut(int proxy_routing_id,
708 bool is_loading, 708 bool is_loading,
709 const FrameReplicationState& replicated_frame_state); 709 const FrameReplicationState& replicated_frame_state);
710 void OnDeleteFrame();
710 void OnStop(); 711 void OnStop();
711 void OnShowContextMenu(const gfx::Point& location); 712 void OnShowContextMenu(const gfx::Point& location);
712 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); 713 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
713 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, 714 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
714 unsigned action); 715 unsigned action);
715 void OnUndo(); 716 void OnUndo();
716 void OnRedo(); 717 void OnRedo();
717 void OnCut(); 718 void OnCut();
718 void OnCopy(); 719 void OnCopy();
719 void OnPaste(); 720 void OnPaste();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 // constructor until SetWebFrame is called, and it is null after 939 // constructor until SetWebFrame is called, and it is null after
939 // frameDetached is called until destruction (which is asynchronous in the 940 // frameDetached is called until destruction (which is asynchronous in the
940 // case of the main frame, but not subframes). 941 // case of the main frame, but not subframes).
941 blink::WebLocalFrame* frame_; 942 blink::WebLocalFrame* frame_;
942 943
943 // Boolean value indicating whether this RenderFrameImpl object is for the 944 // Boolean value indicating whether this RenderFrameImpl object is for the
944 // main frame or not. It remains accurate during destruction, even when 945 // main frame or not. It remains accurate during destruction, even when
945 // |frame_| has been invalidated. 946 // |frame_| has been invalidated.
946 bool is_main_frame_; 947 bool is_main_frame_;
947 948
949 // When a frame is detached in response to a message from the browser process,
950 // this RenderFrame should not be sending notifications back to it. This
951 // boolean is used to indicate this case.
952 bool in_browser_initiated_detach_;
953
954 // Indicates whether the frame has been inserted into the frame tree yet or
955 // not.
956 //
957 // When a frame is created by the browser process, it is for a pending
958 // navigation. In this case, it is not immediately attached to the frame tree
959 // if there is a RenderFrameProxy for the same frame. It is inserted into the
960 // frame tree at the time the pending navigation commits.
961 // Frames added by the parent document are created from the renderer process
962 // and are immediately inserted in the frame tree.
963 // TODO(dcheng): Remove this once we have FrameTreeHandle and can use the
964 // Blink Web* layer to check for provisional frames.
965 bool in_frame_tree_;
966
948 base::WeakPtr<RenderViewImpl> render_view_; 967 base::WeakPtr<RenderViewImpl> render_view_;
949 int routing_id_; 968 int routing_id_;
950 bool is_swapped_out_; 969 bool is_swapped_out_;
951 970
952 // RenderFrameProxy exists only when is_swapped_out_ is true. 971 // RenderFrameProxy exists only when is_swapped_out_ is true.
953 // TODO(nasko): This can be removed once we don't have a swapped out state on 972 // TODO(nasko): This can be removed once we don't have a swapped out state on
954 // RenderFrame. See https://crbug.com/357747. 973 // RenderFrame. See https://crbug.com/357747.
955 RenderFrameProxy* render_frame_proxy_; 974 RenderFrameProxy* render_frame_proxy_;
956 bool is_detaching_; 975 bool is_detaching_;
957 976
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 #endif 1161 #endif
1143 1162
1144 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1163 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1145 1164
1146 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1165 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1147 }; 1166 };
1148 1167
1149 } // namespace content 1168 } // namespace content
1150 1169
1151 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1170 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698