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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 void SaveImageAt(int x, int y) override; | 158 void SaveImageAt(int x, int y) override; |
| 159 RenderViewHost* GetRenderViewHost() override; | 159 RenderViewHost* GetRenderViewHost() override; |
| 160 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; | 160 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; |
| 161 service_manager::InterfaceProvider* GetRemoteInterfaces() override; | 161 service_manager::InterfaceProvider* GetRemoteInterfaces() override; |
| 162 AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() override; | 162 AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() override; |
| 163 blink::WebPageVisibilityState GetVisibilityState() override; | 163 blink::WebPageVisibilityState GetVisibilityState() override; |
| 164 bool IsRenderFrameLive() override; | 164 bool IsRenderFrameLive() override; |
| 165 int GetProxyCount() override; | 165 int GetProxyCount() override; |
| 166 void FilesSelectedInChooser(const std::vector<FileChooserFileInfo>& files, | 166 void FilesSelectedInChooser(const std::vector<FileChooserFileInfo>& files, |
| 167 FileChooserParams::Mode permissions) override; | 167 FileChooserParams::Mode permissions) override; |
| 168 bool HasSelection() override; | |
| 168 void RequestTextSurroundingSelection( | 169 void RequestTextSurroundingSelection( |
| 169 const TextSurroundingSelectionCallback& callback, | 170 const TextSurroundingSelectionCallback& callback, |
| 170 int max_length) override; | 171 int max_length) override; |
| 171 | 172 |
| 172 // mojom::FrameHost | 173 // mojom::FrameHost |
| 173 void GetInterfaceProvider( | 174 void GetInterfaceProvider( |
| 174 service_manager::mojom::InterfaceProviderRequest interfaces) override; | 175 service_manager::mojom::InterfaceProviderRequest interfaces) override; |
| 175 | 176 |
| 176 // IPC::Sender | 177 // IPC::Sender |
| 177 bool Send(IPC::Message* msg) override; | 178 bool Send(IPC::Message* msg) override; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 // transfer navigations, where no DidStart/DidStopLoading notifications | 260 // transfer navigations, where no DidStart/DidStopLoading notifications |
| 260 // should be sent during the transfer. | 261 // should be sent during the transfer. |
| 261 // TODO(clamy): Remove this once PlzNavigate ships. | 262 // TODO(clamy): Remove this once PlzNavigate ships. |
| 262 void set_is_loading(bool is_loading) { is_loading_ = is_loading; } | 263 void set_is_loading(bool is_loading) { is_loading_ = is_loading; } |
| 263 | 264 |
| 264 // Returns true if this is a top-level frame, or if this frame's RenderFrame | 265 // Returns true if this is a top-level frame, or if this frame's RenderFrame |
| 265 // is in a different process from its parent frame. Local roots are | 266 // is in a different process from its parent frame. Local roots are |
| 266 // distinguished by owning a RenderWidgetHost, which manages input events | 267 // distinguished by owning a RenderWidgetHost, which manages input events |
| 267 // and painting for this frame and its contiguous local subtree in the | 268 // and painting for this frame and its contiguous local subtree in the |
| 268 // renderer process. | 269 // renderer process. |
| 269 bool is_local_root() { return !!render_widget_host_; } | 270 bool is_local_root() const { return !!render_widget_host_; } |
| 270 | 271 |
| 271 // Returns the RenderWidgetHostImpl attached to this frame or the nearest | 272 // Returns the RenderWidgetHostImpl attached to this frame or the nearest |
| 272 // ancestor frame, which could potentially be the root. For most input | 273 // ancestor frame, which could potentially be the root. For most input |
| 273 // and rendering related purposes, GetView() should be preferred and | 274 // and rendering related purposes, GetView() should be preferred and |
| 274 // RenderWidgetHostViewBase methods used. GetRenderWidgetHost() will not | 275 // RenderWidgetHostViewBase methods used. GetRenderWidgetHost() will not |
| 275 // return a nullptr, whereas GetView() potentially will (for instance, | 276 // return a nullptr, whereas GetView() potentially will (for instance, |
| 276 // after a renderer crash). | 277 // after a renderer crash). |
| 277 // | 278 // |
| 278 // This method crashes if this RenderFrameHostImpl does not own a | 279 // This method crashes if this RenderFrameHostImpl does not own a |
| 279 // a RenderWidgetHost and nor does any of its ancestors. That would | 280 // a RenderWidgetHost and nor does any of its ancestors. That would |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1034 // The pending WebUIImpl and its type. These values will be used exclusively | 1035 // The pending WebUIImpl and its type. These values will be used exclusively |
| 1035 // for same-site navigations to keep a transition of a WebUI in a pending | 1036 // for same-site navigations to keep a transition of a WebUI in a pending |
| 1036 // state until the navigation commits. | 1037 // state until the navigation commits. |
| 1037 std::unique_ptr<WebUIImpl> pending_web_ui_; | 1038 std::unique_ptr<WebUIImpl> pending_web_ui_; |
| 1038 WebUI::TypeID pending_web_ui_type_; | 1039 WebUI::TypeID pending_web_ui_type_; |
| 1039 | 1040 |
| 1040 // If true the associated WebUI should be reused when CommitPendingWebUI is | 1041 // If true the associated WebUI should be reused when CommitPendingWebUI is |
| 1041 // called (no pending instance should be set). | 1042 // called (no pending instance should be set). |
| 1042 bool should_reuse_web_ui_; | 1043 bool should_reuse_web_ui_; |
| 1043 | 1044 |
| 1045 bool has_selection_; | |
|
nasko
2016/11/02 04:50:37
nit: Put a small comment on what the meaning of th
Lei Zhang
2016/11/08 11:13:22
Done.
| |
| 1046 | |
| 1044 // PlzNavigate: The LoFi state of the last navigation. This is used during | 1047 // PlzNavigate: The LoFi state of the last navigation. This is used during |
| 1045 // history navigation of subframes to ensure that subframes navigate with the | 1048 // history navigation of subframes to ensure that subframes navigate with the |
| 1046 // same LoFi status as the top-level frame. | 1049 // same LoFi status as the top-level frame. |
| 1047 LoFiState last_navigation_lofi_state_; | 1050 LoFiState last_navigation_lofi_state_; |
| 1048 | 1051 |
| 1049 mojo::Binding<mojom::FrameHost> frame_host_binding_; | 1052 mojo::Binding<mojom::FrameHost> frame_host_binding_; |
| 1050 mojom::FramePtr frame_; | 1053 mojom::FramePtr frame_; |
| 1051 | 1054 |
| 1052 // Callback for responding when | 1055 // Callback for responding when |
| 1053 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. | 1056 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. |
| 1054 TextSurroundingSelectionCallback text_surrounding_selection_callback_; | 1057 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
| 1055 | 1058 |
| 1056 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> | 1059 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> |
| 1057 media_registries_; | 1060 media_registries_; |
| 1058 | 1061 |
| 1059 std::unique_ptr<AssociatedInterfaceProviderImpl> | 1062 std::unique_ptr<AssociatedInterfaceProviderImpl> |
| 1060 remote_associated_interfaces_; | 1063 remote_associated_interfaces_; |
| 1061 // NOTE: This must be the last member. | 1064 // NOTE: This must be the last member. |
| 1062 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1065 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 1063 | 1066 |
| 1064 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1067 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 1065 }; | 1068 }; |
| 1066 | 1069 |
| 1067 } // namespace content | 1070 } // namespace content |
| 1068 | 1071 |
| 1069 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1072 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |