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 #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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // | 696 // |
697 // The documentation for these functions should be in | 697 // The documentation for these functions should be in |
698 // content/common/*_messages.h for the message that the function is handling. | 698 // content/common/*_messages.h for the message that the function is handling. |
699 void OnNavigate(const CommonNavigationParams& common_params, | 699 void OnNavigate(const CommonNavigationParams& common_params, |
700 const StartNavigationParams& start_params, | 700 const StartNavigationParams& start_params, |
701 const RequestNavigationParams& request_params); | 701 const RequestNavigationParams& request_params); |
702 void OnBeforeUnload(); | 702 void OnBeforeUnload(); |
703 void OnSwapOut(int proxy_routing_id, | 703 void OnSwapOut(int proxy_routing_id, |
704 bool is_loading, | 704 bool is_loading, |
705 const FrameReplicationState& replicated_frame_state); | 705 const FrameReplicationState& replicated_frame_state); |
| 706 void OnDeleteFrame(); |
706 void OnStop(); | 707 void OnStop(); |
707 void OnShowContextMenu(const gfx::Point& location); | 708 void OnShowContextMenu(const gfx::Point& location); |
708 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); | 709 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); |
709 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, | 710 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, |
710 unsigned action); | 711 unsigned action); |
711 void OnUndo(); | 712 void OnUndo(); |
712 void OnRedo(); | 713 void OnRedo(); |
713 void OnCut(); | 714 void OnCut(); |
714 void OnCopy(); | 715 void OnCopy(); |
715 void OnPaste(); | 716 void OnPaste(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 // constructor until SetWebFrame is called, and it is null after | 929 // constructor until SetWebFrame is called, and it is null after |
929 // frameDetached is called until destruction (which is asynchronous in the | 930 // frameDetached is called until destruction (which is asynchronous in the |
930 // case of the main frame, but not subframes). | 931 // case of the main frame, but not subframes). |
931 blink::WebLocalFrame* frame_; | 932 blink::WebLocalFrame* frame_; |
932 | 933 |
933 // Boolean value indicating whether this RenderFrameImpl object is for the | 934 // Boolean value indicating whether this RenderFrameImpl object is for the |
934 // main frame or not. It remains accurate during destruction, even when | 935 // main frame or not. It remains accurate during destruction, even when |
935 // |frame_| has been invalidated. | 936 // |frame_| has been invalidated. |
936 bool is_main_frame_; | 937 bool is_main_frame_; |
937 | 938 |
| 939 // When a frame is detached in response to a message from the browser process, |
| 940 // this RenderFrame should not be sending notifications back to it. This |
| 941 // boolean is used to indicate this case. |
| 942 bool in_browser_initiated_detach_; |
| 943 |
| 944 // Indicates whether the frame has been inserted into the frame tree yet or |
| 945 // not. |
| 946 // |
| 947 // When a frame is created by the browser process, it is for a pending |
| 948 // navigation. In this case, it is not immediately attached to the frame tree |
| 949 // if there is a RenderFrameProxy for the same frame. It is inserted into the |
| 950 // frame tree at the time the pending navigation commits. |
| 951 // Frames added by the parent document are created from the renderer process |
| 952 // and are immediately inserted in the frame tree. |
| 953 // TODO(dcheng): Remove this once we have FrameTreeHandle and can use the |
| 954 // Blink Web* layer to check for provisional frames. |
| 955 bool in_frame_tree_; |
| 956 |
938 base::WeakPtr<RenderViewImpl> render_view_; | 957 base::WeakPtr<RenderViewImpl> render_view_; |
939 int routing_id_; | 958 int routing_id_; |
940 bool is_swapped_out_; | 959 bool is_swapped_out_; |
941 | 960 |
942 // RenderFrameProxy exists only when is_swapped_out_ is true. | 961 // RenderFrameProxy exists only when is_swapped_out_ is true. |
943 // TODO(nasko): This can be removed once we don't have a swapped out state on | 962 // TODO(nasko): This can be removed once we don't have a swapped out state on |
944 // RenderFrame. See https://crbug.com/357747. | 963 // RenderFrame. See https://crbug.com/357747. |
945 RenderFrameProxy* render_frame_proxy_; | 964 RenderFrameProxy* render_frame_proxy_; |
946 bool is_detaching_; | 965 bool is_detaching_; |
947 | 966 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 #endif | 1148 #endif |
1130 | 1149 |
1131 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1150 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1132 | 1151 |
1133 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1152 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1134 }; | 1153 }; |
1135 | 1154 |
1136 } // namespace content | 1155 } // namespace content |
1137 | 1156 |
1138 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1157 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |