1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 #include "core/CoreExport.h"
9 #include "core/dom/RemoteSecurityContext.h"
10 #include "core/frame/Frame.h"
16 class RemoteDOMWindow
;
17 class RemoteFrameClient
;
18 class RemoteFrameView
;
20 class WindowProxyManager
;
21 struct FrameLoadRequest
;
23 class CORE_EXPORT RemoteFrame
: public Frame
{
25 static PassRefPtrWillBeRawPtr
<RemoteFrame
> create(RemoteFrameClient
*, FrameHost
*, FrameOwner
*);
27 ~RemoteFrame() override
;
30 DECLARE_VIRTUAL_TRACE();
31 bool isRemoteFrame() const override
{ return true; }
32 DOMWindow
* domWindow() const override
;
33 WindowProxy
* windowProxy(DOMWrapperWorld
&) override
;
34 void navigate(Document
& originDocument
, const KURL
&, bool replaceCurrentItem
, UserGestureStatus
) override
;
35 void navigate(const FrameLoadRequest
& passedRequest
) override
;
36 void reload(FrameLoadType
, ClientRedirectPolicy
) override
;
37 void detach(FrameDetachType
) override
;
38 RemoteSecurityContext
* securityContext() const override
;
39 void printNavigationErrorMessage(const Frame
&, const char* reason
) override
{ }
40 void disconnectOwnerElement() override
;
41 bool prepareForCommit() override
;
42 bool shouldClose() override
;
44 // FIXME: Remove this method once we have input routing in the browser
45 // process. See http://crbug.com/339659.
46 void forwardInputEvent(Event
*);
48 void frameRectsChanged(const IntRect
& frameRect
);
50 void setRemotePlatformLayer(WebLayer
*);
51 WebLayer
* remotePlatformLayer() const { return m_remotePlatformLayer
; }
53 void setView(PassRefPtrWillBeRawPtr
<RemoteFrameView
>);
56 RemoteFrameView
* view() const;
59 RemoteFrame(RemoteFrameClient
*, FrameHost
*, FrameOwner
*);
61 // Internal Frame helper overrides:
62 WindowProxyManager
* windowProxyManager() const override
{ return m_windowProxyManager
.get(); }
64 RemoteFrameClient
* remoteFrameClient() const;
66 RefPtrWillBeMember
<RemoteFrameView
> m_view
;
67 RefPtrWillBeMember
<RemoteSecurityContext
> m_securityContext
;
68 RefPtrWillBeMember
<RemoteDOMWindow
> m_domWindow
;
69 OwnPtrWillBeMember
<WindowProxyManager
> m_windowProxyManager
;
70 WebLayer
* m_remotePlatformLayer
;
73 inline RemoteFrameView
* RemoteFrame::view() const
78 DEFINE_TYPE_CASTS(RemoteFrame
, Frame
, remoteFrame
, remoteFrame
->isRemoteFrame(), remoteFrame
.isRemoteFrame());
82 #endif // RemoteFrame_h