| 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 19 matching lines...) Expand all Loading... |
| 30 #include "content/common/ax_content_node_data.h" | 30 #include "content/common/ax_content_node_data.h" |
| 31 #include "content/common/content_export.h" | 31 #include "content/common/content_export.h" |
| 32 #include "content/common/download/mhtml_save_status.h" | 32 #include "content/common/download/mhtml_save_status.h" |
| 33 #include "content/common/frame.mojom.h" | 33 #include "content/common/frame.mojom.h" |
| 34 #include "content/common/frame_message_enums.h" | 34 #include "content/common/frame_message_enums.h" |
| 35 #include "content/common/frame_replication_state.h" | 35 #include "content/common/frame_replication_state.h" |
| 36 #include "content/common/image_downloader/image_downloader.mojom.h" | 36 #include "content/common/image_downloader/image_downloader.mojom.h" |
| 37 #include "content/common/navigation_params.h" | 37 #include "content/common/navigation_params.h" |
| 38 #include "content/public/browser/render_frame_host.h" | 38 #include "content/public/browser/render_frame_host.h" |
| 39 #include "content/public/common/javascript_message_type.h" | 39 #include "content/public/common/javascript_message_type.h" |
| 40 #include "content/public/common/previews_state.h" |
| 40 #include "media/mojo/interfaces/interface_factory.mojom.h" | 41 #include "media/mojo/interfaces/interface_factory.mojom.h" |
| 41 #include "net/http/http_response_headers.h" | 42 #include "net/http/http_response_headers.h" |
| 42 #include "services/service_manager/public/cpp/interface_factory.h" | 43 #include "services/service_manager/public/cpp/interface_factory.h" |
| 43 #include "services/service_manager/public/cpp/interface_registry.h" | 44 #include "services/service_manager/public/cpp/interface_registry.h" |
| 44 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" | 45 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" |
| 45 #include "third_party/WebKit/public/web/WebTextDirection.h" | 46 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 46 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 47 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
| 47 #include "ui/accessibility/ax_node_data.h" | 48 #include "ui/accessibility/ax_node_data.h" |
| 48 #include "ui/base/page_transition_types.h" | 49 #include "ui/base/page_transition_types.h" |
| 49 | 50 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 void ResetLoadingState(); | 566 void ResetLoadingState(); |
| 566 | 567 |
| 567 // Tells the renderer that this RenderFrame will soon be swapped out, and thus | 568 // 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 | 569 // 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 | 570 // separately so that the ScopedPageLoadDeferrers of any current dialogs are |
| 570 // no longer on the stack when we attempt to swap it out. | 571 // no longer on the stack when we attempt to swap it out. |
| 571 void SuppressFurtherDialogs(); | 572 void SuppressFurtherDialogs(); |
| 572 | 573 |
| 573 void SetHasReceivedUserGesture(); | 574 void SetHasReceivedUserGesture(); |
| 574 | 575 |
| 575 // PlzNavigate: returns the LoFi state of the last successful navigation that | 576 // PlzNavigate: returns the Previews state of the last successful navigation |
| 576 // made a network request. | 577 // that made a network request. |
| 577 LoFiState last_navigation_lofi_state() const { | 578 PreviewsState last_navigation_previews_state() const { |
| 578 return last_navigation_lofi_state_; | 579 return last_navigation_previews_state_; |
| 579 } | 580 } |
| 580 | 581 |
| 581 protected: | 582 protected: |
| 582 friend class RenderFrameHostFactory; | 583 friend class RenderFrameHostFactory; |
| 583 | 584 |
| 584 // |flags| is a combination of CreateRenderFrameFlags. | 585 // |flags| is a combination of CreateRenderFrameFlags. |
| 585 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 586 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
| 586 // 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 |
| 587 // into WebContentsObserver::FrameDetached for now. | 588 // into WebContentsObserver::FrameDetached for now. |
| 588 RenderFrameHostImpl(SiteInstance* site_instance, | 589 RenderFrameHostImpl(SiteInstance* site_instance, |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 std::unique_ptr<WebUIImpl> pending_web_ui_; | 1054 std::unique_ptr<WebUIImpl> pending_web_ui_; |
| 1054 WebUI::TypeID pending_web_ui_type_; | 1055 WebUI::TypeID pending_web_ui_type_; |
| 1055 | 1056 |
| 1056 // If true the associated WebUI should be reused when CommitPendingWebUI is | 1057 // If true the associated WebUI should be reused when CommitPendingWebUI is |
| 1057 // called (no pending instance should be set). | 1058 // called (no pending instance should be set). |
| 1058 bool should_reuse_web_ui_; | 1059 bool should_reuse_web_ui_; |
| 1059 | 1060 |
| 1060 // If true, then the RenderFrame has selected text. | 1061 // If true, then the RenderFrame has selected text. |
| 1061 bool has_selection_; | 1062 bool has_selection_; |
| 1062 | 1063 |
| 1063 // PlzNavigate: The LoFi state of the last navigation. This is used during | 1064 // PlzNavigate: The Previews state of the last navigation. This is used during |
| 1064 // history navigation of subframes to ensure that subframes navigate with the | 1065 // history navigation of subframes to ensure that subframes navigate with the |
| 1065 // same LoFi status as the top-level frame. | 1066 // same Previews status as the top-level frame. |
| 1066 LoFiState last_navigation_lofi_state_; | 1067 PreviewsState last_navigation_previews_state_; |
| 1067 | 1068 |
| 1068 mojo::Binding<mojom::FrameHost> frame_host_binding_; | 1069 mojo::Binding<mojom::FrameHost> frame_host_binding_; |
| 1069 mojom::FramePtr frame_; | 1070 mojom::FramePtr frame_; |
| 1070 | 1071 |
| 1071 // If this is true then this object was created in response to a renderer | 1072 // 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 | 1073 // initiated request. Init() will be called, and until then navigation |
| 1073 // requests should be queued. | 1074 // requests should be queued. |
| 1074 bool waiting_for_init_; | 1075 bool waiting_for_init_; |
| 1075 | 1076 |
| 1076 typedef std::pair<CommonNavigationParams, BeginNavigationParams> | 1077 typedef std::pair<CommonNavigationParams, BeginNavigationParams> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1092 remote_associated_interfaces_; | 1093 remote_associated_interfaces_; |
| 1093 // NOTE: This must be the last member. | 1094 // NOTE: This must be the last member. |
| 1094 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1095 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 1095 | 1096 |
| 1096 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1097 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 1097 }; | 1098 }; |
| 1098 | 1099 |
| 1099 } // namespace content | 1100 } // namespace content |
| 1100 | 1101 |
| 1101 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1102 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |