| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 void ResetLoadingState(); | 560 void ResetLoadingState(); |
| 561 | 561 |
| 562 // Tells the renderer that this RenderFrame will soon be swapped out, and thus | 562 // Tells the renderer that this RenderFrame will soon be swapped out, and thus |
| 563 // not to create any new modal dialogs until it happens. This must be done | 563 // not to create any new modal dialogs until it happens. This must be done |
| 564 // separately so that the ScopedPageLoadDeferrers of any current dialogs are | 564 // separately so that the ScopedPageLoadDeferrers of any current dialogs are |
| 565 // no longer on the stack when we attempt to swap it out. | 565 // no longer on the stack when we attempt to swap it out. |
| 566 void SuppressFurtherDialogs(); | 566 void SuppressFurtherDialogs(); |
| 567 | 567 |
| 568 void SetHasReceivedUserGesture(); | 568 void SetHasReceivedUserGesture(); |
| 569 | 569 |
| 570 void ClearFocusedElement(); |
| 571 |
| 570 // PlzNavigate: returns the LoFi state of the last successful navigation that | 572 // PlzNavigate: returns the LoFi state of the last successful navigation that |
| 571 // made a network request. | 573 // made a network request. |
| 572 LoFiState last_navigation_lofi_state() const { | 574 LoFiState last_navigation_lofi_state() const { |
| 573 return last_navigation_lofi_state_; | 575 return last_navigation_lofi_state_; |
| 574 } | 576 } |
| 575 | 577 |
| 578 bool has_focused_editable_element() const { |
| 579 return has_focused_editable_element_; |
| 580 } |
| 581 |
| 576 protected: | 582 protected: |
| 577 friend class RenderFrameHostFactory; | 583 friend class RenderFrameHostFactory; |
| 578 | 584 |
| 579 // |flags| is a combination of CreateRenderFrameFlags. | 585 // |flags| is a combination of CreateRenderFrameFlags. |
| 580 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 586 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 581 // should be the abstraction needed here, but we need RenderViewHost to pass | 587 // should be the abstraction needed here, but we need RenderViewHost to pass |
| 582 // into WebContentsObserver::FrameDetached for now. | 588 // into WebContentsObserver::FrameDetached for now. |
| 583 RenderFrameHostImpl(SiteInstance* site_instance, | 589 RenderFrameHostImpl(SiteInstance* site_instance, |
| 584 RenderViewHostImpl* render_view_host, | 590 RenderViewHostImpl* render_view_host, |
| 585 RenderFrameHostDelegate* delegate, | 591 RenderFrameHostDelegate* delegate, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 void OnDidStopLoading(); | 698 void OnDidStopLoading(); |
| 693 void OnDidChangeLoadProgress(double load_progress); | 699 void OnDidChangeLoadProgress(double load_progress); |
| 694 void OnSerializeAsMHTMLResponse( | 700 void OnSerializeAsMHTMLResponse( |
| 695 int job_id, | 701 int job_id, |
| 696 bool success, | 702 bool success, |
| 697 const std::set<std::string>& digests_of_uris_of_serialized_resources, | 703 const std::set<std::string>& digests_of_uris_of_serialized_resources, |
| 698 base::TimeDelta renderer_main_thread_time); | 704 base::TimeDelta renderer_main_thread_time); |
| 699 void OnSelectionChanged(const base::string16& text, | 705 void OnSelectionChanged(const base::string16& text, |
| 700 uint32_t offset, | 706 uint32_t offset, |
| 701 const gfx::Range& range); | 707 const gfx::Range& range); |
| 708 void OnFocusedNodeChanged(bool is_editable_element, |
| 709 const gfx::Rect& bounds_in_frame_widget); |
| 702 | 710 |
| 703 #if defined(USE_EXTERNAL_POPUP_MENU) | 711 #if defined(USE_EXTERNAL_POPUP_MENU) |
| 704 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 712 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
| 705 void OnHidePopup(); | 713 void OnHidePopup(); |
| 706 #endif | 714 #endif |
| 707 | 715 |
| 708 // Registers Mojo interfaces that this frame host makes available. | 716 // Registers Mojo interfaces that this frame host makes available. |
| 709 void RegisterMojoInterfaces(); | 717 void RegisterMojoInterfaces(); |
| 710 | 718 |
| 711 // Resets any waiting state of this RenderFrameHost that is no longer | 719 // Resets any waiting state of this RenderFrameHost that is no longer |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 LoFiState last_navigation_lofi_state_; | 1050 LoFiState last_navigation_lofi_state_; |
| 1043 | 1051 |
| 1044 mojo::Binding<mojom::FrameHost> frame_host_binding_; | 1052 mojo::Binding<mojom::FrameHost> frame_host_binding_; |
| 1045 mojom::FramePtr frame_; | 1053 mojom::FramePtr frame_; |
| 1046 | 1054 |
| 1047 // If this is true then this object was created in response to a renderer | 1055 // If this is true then this object was created in response to a renderer |
| 1048 // initiated request. Init() will be called, and until then navigation | 1056 // initiated request. Init() will be called, and until then navigation |
| 1049 // requests should be queued. | 1057 // requests should be queued. |
| 1050 bool waiting_for_init_; | 1058 bool waiting_for_init_; |
| 1051 | 1059 |
| 1060 // If true then this frame's document has a focused element which is editable. |
| 1061 bool has_focused_editable_element_; |
| 1062 |
| 1052 typedef std::pair<CommonNavigationParams, BeginNavigationParams> | 1063 typedef std::pair<CommonNavigationParams, BeginNavigationParams> |
| 1053 PendingNavigation; | 1064 PendingNavigation; |
| 1054 std::unique_ptr<PendingNavigation> pendinging_navigate_; | 1065 std::unique_ptr<PendingNavigation> pendinging_navigate_; |
| 1055 | 1066 |
| 1056 // Callback for responding when | 1067 // Callback for responding when |
| 1057 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. | 1068 // |FrameHostMsg_TextSurroundingSelectionResponse| message comes. |
| 1058 TextSurroundingSelectionCallback text_surrounding_selection_callback_; | 1069 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
| 1059 | 1070 |
| 1060 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> | 1071 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> |
| 1061 media_registries_; | 1072 media_registries_; |
| 1062 | 1073 |
| 1063 std::unique_ptr<AssociatedInterfaceProviderImpl> | 1074 std::unique_ptr<AssociatedInterfaceProviderImpl> |
| 1064 remote_associated_interfaces_; | 1075 remote_associated_interfaces_; |
| 1065 // NOTE: This must be the last member. | 1076 // NOTE: This must be the last member. |
| 1066 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1077 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 1067 | 1078 |
| 1068 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1079 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 1069 }; | 1080 }; |
| 1070 | 1081 |
| 1071 } // namespace content | 1082 } // namespace content |
| 1072 | 1083 |
| 1073 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1084 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |