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 "platform/heap/Handle.h"
17 enum class FrameDetachType
;
19 class CORE_EXPORT FrameClient
: public NoBaseWillBeGarbageCollectedFinalized
<FrameClient
> {
20 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FrameClient
);
22 virtual bool inShadowTree() const = 0;
24 // TODO(dcheng): Move this into FrameLoaderClient, since remote frames don't
26 virtual void willBeDetached() = 0;
27 virtual void detached(FrameDetachType
) = 0;
29 virtual Frame
* opener() const = 0;
30 virtual void setOpener(Frame
*) = 0;
32 virtual Frame
* parent() const = 0;
33 virtual Frame
* top() const = 0;
34 virtual Frame
* previousSibling() const = 0;
35 virtual Frame
* nextSibling() const = 0;
36 virtual Frame
* firstChild() const = 0;
37 virtual Frame
* lastChild() const = 0;
39 virtual unsigned backForwardLength() = 0;
41 // Returns true if the embedder intercepted the postMessage call
42 virtual bool willCheckAndDispatchMessageEvent(SecurityOrigin
* /*target*/, MessageEvent
*, LocalFrame
* /*sourceFrame*/) const { return false; }
44 virtual ~FrameClient() { }
46 DEFINE_INLINE_VIRTUAL_TRACE() { }
51 #endif // FrameClient_h