// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_RENDERER_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ #define CONTENT_BROWSER_RENDERER_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ #include <stdint.h> #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "cc/input/touch_action.h" #include "components/viz/common/quads/compositor_frame.h" #include "components/viz/common/surfaces/local_surface_id.h" #include "components/viz/common/surfaces/surface_id.h" #include "content/common/content_export.h" #include "third_party/blink/public/common/frame/frame_visual_properties.h" #include "third_party/blink/public/mojom/frame/intrinsic_sizing_info.mojom-forward.h" #include "third_party/blink/public/mojom/frame/lifecycle.mojom.h" #include "third_party/blink/public/mojom/frame/viewport_intersection_state.mojom.h" #include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h" #include "third_party/blink/public/mojom/input/pointer_lock_result.mojom-shared.h" #include "ui/display/screen_infos.h" #include "ui/gfx/geometry/rect.h" namespace blink { struct FrameVisualProperties; class WebGestureEvent; } // namespace blink namespace cc { class RenderFrameMetadata; } namespace input { class RenderWidgetHostViewInput; } // namespace input namespace ui { class Cursor; } namespace viz { class SurfaceId; class SurfaceInfo; } // namespace viz namespace content { class RenderFrameHostImpl; class RenderFrameProxyHost; class RenderWidgetHostViewBase; class RenderWidgetHostViewChildFrame; // CrossProcessFrameConnector provides the platform view abstraction for // RenderWidgetHostViewChildFrame allowing RWHVChildFrame to remain ignorant // of RenderFrameHost. // // The RenderWidgetHostView of an out-of-process child frame needs to // communicate with the RenderFrameProxyHost representing this frame in the // process of the parent frame. For example, assume you have this page: // // ----------------- // | frame 1 | // | ----------- | // | | frame 2 | | // | ----------- | // ----------------- // // If frames 1 and 2 are in process A and B, there are 4 hosts: // A1 - RFH for frame 1 in process A // B1 - RFPH for frame 1 in process B // A2 - RFPH for frame 2 in process A // B2 - RFH for frame 2 in process B // // B2, having a parent frame in a different process, will have a // RenderWidgetHostViewChildFrame. This RenderWidgetHostViewChildFrame needs // to communicate with A2 because the embedding frame represents the platform // that the child frame is rendering into -- it needs information necessary for // compositing child frame textures, and also can pass platform messages such as // view resizing. CrossProcessFrameConnector bridges between B2's // RenderWidgetHostViewChildFrame and A2 to allow for this communication. // (Note: B1 is only mentioned for completeness. It is not needed in this // example.) // // CrossProcessFrameConnector objects are owned by the RenderFrameProxyHost // in the child frame's RenderFrameHostManager corresponding to the parent's // SiteInstance, A2 in the picture above. When a child frame navigates in a new // process, SetView() is called to update to the new view. // class CONTENT_EXPORT CrossProcessFrameConnector { … }; } // namespace content #endif // CONTENT_BROWSER_RENDERER_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_