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.
4
5#ifndef FrameClient_h
6#define FrameClient_h
7
8namespace blink {
9
10class Frame;
11class LocalFrame;
12class MessageEvent;
13class SecurityOrigin;
14
15class FrameClient {
16public:
17    virtual Frame* opener() const = 0;
18    virtual void setOpener(Frame*) = 0;
19
20    virtual Frame* parent() const = 0;
21    virtual Frame* top() const = 0;
22    virtual Frame* previousSibling() const = 0;
23    virtual Frame* nextSibling() const = 0;
24    virtual Frame* firstChild() const = 0;
25    virtual Frame* lastChild() const = 0;
26
27    // Returns true if the embedder intercepted the postMessage call
28    virtual bool willCheckAndDispatchMessageEvent(SecurityOrigin* /*target*/, MessageEvent*, LocalFrame* /*sourceFrame*/) const { return false; }
29
30    virtual ~FrameClient() { }
31};
32
33} // namespace blink
34
35#endif // FrameClient_h
36