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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 565 void ResetLoadingState(); | 565 void ResetLoadingState(); |
| 566 | 566 |
| 567 // Tells the renderer that this RenderFrame will soon be swapped out, and thus | 567 // Tells the renderer that this RenderFrame will soon be swapped out, and thus |
| 568 // not to create any new modal dialogs until it happens. This must be done | 568 // not to create any new modal dialogs until it happens. This must be done |
| 569 // separately so that the ScopedPageLoadDeferrers of any current dialogs are | 569 // separately so that the ScopedPageLoadDeferrers of any current dialogs are |
| 570 // no longer on the stack when we attempt to swap it out. | 570 // no longer on the stack when we attempt to swap it out. |
| 571 void SuppressFurtherDialogs(); | 571 void SuppressFurtherDialogs(); |
| 572 | 572 |
| 573 void SetHasReceivedUserGesture(); | 573 void SetHasReceivedUserGesture(); |
| 574 | 574 |
| 575 void ClearFocusedElement(); | |
| 576 | |
| 575 // PlzNavigate: returns the LoFi state of the last successful navigation that | 577 // PlzNavigate: returns the LoFi state of the last successful navigation that |
| 576 // made a network request. | 578 // made a network request. |
| 577 LoFiState last_navigation_lofi_state() const { | 579 LoFiState last_navigation_lofi_state() const { |
| 578 return last_navigation_lofi_state_; | 580 return last_navigation_lofi_state_; |
| 579 } | 581 } |
| 580 | 582 |
| 583 bool has_focused_editable_element() const { | |
| 584 return has_focused_editable_element_; | |
| 585 } | |
| 586 | |
| 581 protected: | 587 protected: |
| 582 friend class RenderFrameHostFactory; | 588 friend class RenderFrameHostFactory; |
| 583 | 589 |
| 584 // |flags| is a combination of CreateRenderFrameFlags. | 590 // |flags| is a combination of CreateRenderFrameFlags. |
| 585 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 591 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 586 // should be the abstraction needed here, but we need RenderViewHost to pass | 592 // should be the abstraction needed here, but we need RenderViewHost to pass |
| 587 // into WebContentsObserver::FrameDetached for now. | 593 // into WebContentsObserver::FrameDetached for now. |
| 588 RenderFrameHostImpl(SiteInstance* site_instance, | 594 RenderFrameHostImpl(SiteInstance* site_instance, |
| 589 RenderViewHostImpl* render_view_host, | 595 RenderViewHostImpl* render_view_host, |
| 590 RenderFrameHostDelegate* delegate, | 596 RenderFrameHostDelegate* delegate, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 703 void OnDidStopLoading(); | 709 void OnDidStopLoading(); |
| 704 void OnDidChangeLoadProgress(double load_progress); | 710 void OnDidChangeLoadProgress(double load_progress); |
| 705 void OnSerializeAsMHTMLResponse( | 711 void OnSerializeAsMHTMLResponse( |
| 706 int job_id, | 712 int job_id, |
| 707 MhtmlSaveStatus save_status, | 713 MhtmlSaveStatus save_status, |
| 708 const std::set<std::string>& digests_of_uris_of_serialized_resources, | 714 const std::set<std::string>& digests_of_uris_of_serialized_resources, |
| 709 base::TimeDelta renderer_main_thread_time); | 715 base::TimeDelta renderer_main_thread_time); |
| 710 void OnSelectionChanged(const base::string16& text, | 716 void OnSelectionChanged(const base::string16& text, |
| 711 uint32_t offset, | 717 uint32_t offset, |
| 712 const gfx::Range& range); | 718 const gfx::Range& range); |
| 719 void OnFocusedNodeChanged(bool is_editable_element, | |
| 720 const gfx::Rect& bounds_in_frame_widget); | |
| 713 | 721 |
| 714 #if defined(USE_EXTERNAL_POPUP_MENU) | 722 #if defined(USE_EXTERNAL_POPUP_MENU) |
| 715 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 723 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
| 716 void OnHidePopup(); | 724 void OnHidePopup(); |
| 717 #endif | 725 #endif |
| 718 | 726 |
| 719 // Registers Mojo interfaces that this frame host makes available. | 727 // Registers Mojo interfaces that this frame host makes available. |
| 720 void RegisterMojoInterfaces(); | 728 void RegisterMojoInterfaces(); |
| 721 | 729 |
| 722 // Resets any waiting state of this RenderFrameHost that is no longer | 730 // Resets any waiting state of this RenderFrameHost that is no longer |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1066 LoFiState last_navigation_lofi_state_; | 1074 LoFiState last_navigation_lofi_state_; |
| 1067 | 1075 |
| 1068 mojo::Binding<mojom::FrameHost> frame_host_binding_; | 1076 mojo::Binding<mojom::FrameHost> frame_host_binding_; |
| 1069 mojom::FramePtr frame_; | 1077 mojom::FramePtr frame_; |
| 1070 | 1078 |
| 1071 // If this is true then this object was created in response to a renderer | 1079 // If this is true then this object was created in response to a renderer |
| 1072 // initiated request. Init() will be called, and until then navigation | 1080 // initiated request. Init() will be called, and until then navigation |
| 1073 // requests should be queued. | 1081 // requests should be queued. |
| 1074 bool waiting_for_init_; | 1082 bool waiting_for_init_; |
| 1075 | 1083 |
| 1084 // If there then this frame's document has a focused element which editable. | |
|
ncarter (slow)
2016/12/16 19:17:21
"If there" -> "If true"
"which editable" -> "whic
EhsanK
2016/12/20 16:39:10
Thanks! Done.
| |
| 1085 bool has_focused_editable_element_; | |
| 1086 | |
| 1076 typedef std::pair<CommonNavigationParams, BeginNavigationParams> | 1087 typedef std::pair<CommonNavigationParams, BeginNavigationParams> |
| 1077 PendingNavigation; | 1088 PendingNavigation; |
| 1078 std::unique_ptr<PendingNavigation> pendinging_navigate_; | 1089 std::unique_ptr<PendingNavigation> pendinging_navigate_; |
| 1079 | 1090 |
| 1080 // Callback for responding when | 1091 // Callback for responding when |
| 1081 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. | 1092 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. |
| 1082 TextSurroundingSelectionCallback text_surrounding_selection_callback_; | 1093 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
| 1083 | 1094 |
| 1084 // Hosts media::mojom::InterfaceFactory for the RenderFrame and forwards | 1095 // Hosts media::mojom::InterfaceFactory for the RenderFrame and forwards |
| 1085 // media::mojom::InterfaceFactory calls to the remote "media" service. | 1096 // media::mojom::InterfaceFactory calls to the remote "media" service. |
| 1086 std::unique_ptr<MediaInterfaceProxy> media_interface_proxy_; | 1097 std::unique_ptr<MediaInterfaceProxy> media_interface_proxy_; |
| 1087 | 1098 |
| 1088 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> | 1099 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> |
| 1089 media_registries_; | 1100 media_registries_; |
| 1090 | 1101 |
| 1091 std::unique_ptr<AssociatedInterfaceProviderImpl> | 1102 std::unique_ptr<AssociatedInterfaceProviderImpl> |
| 1092 remote_associated_interfaces_; | 1103 remote_associated_interfaces_; |
| 1093 | 1104 |
| 1094 // NOTE: This must be the last member. | 1105 // NOTE: This must be the last member. |
| 1095 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1106 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 1096 | 1107 |
| 1097 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1108 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 1098 }; | 1109 }; |
| 1099 | 1110 |
| 1100 } // namespace content | 1111 } // namespace content |
| 1101 | 1112 |
| 1102 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1113 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |