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.
5 #ifndef WebRemoteFrame_h
6 #define WebRemoteFrame_h
8 #include "public/web/WebFrame.h"
9 #include "public/web/WebSandboxFlags.h"
13 enum class WebTreeScopeType
;
15 class WebRemoteFrameClient
;
17 class WebRemoteFrame
: public WebFrame
{
19 BLINK_EXPORT
static WebRemoteFrame
* create(WebTreeScopeType
, WebRemoteFrameClient
*);
21 // Functions for the embedder replicate the frame tree between processes.
22 // TODO(dcheng): The embedder currently does not replicate local frames in
23 // insertion order, so the local child version takes a previous sibling to
24 // ensure that it is inserted into the correct location in the list of
26 virtual WebLocalFrame
* createLocalChild(WebTreeScopeType
, const WebString
& name
, WebSandboxFlags
, WebFrameClient
*, WebFrame
* previousSibling
) = 0;
28 virtual WebRemoteFrame
* createRemoteChild(WebTreeScopeType
, const WebString
& name
, WebSandboxFlags
, WebRemoteFrameClient
*) = 0;
30 // Transfer initial drawing parameters from a local frame.
31 virtual void initializeFromFrame(WebLocalFrame
*) const = 0;
33 // Set security origin replicated from another process.
34 virtual void setReplicatedOrigin(const WebSecurityOrigin
&) const = 0;
36 // Set sandbox flags replicated from another process.
37 virtual void setReplicatedSandboxFlags(WebSandboxFlags
) const = 0;
39 // Set frame name replicated from another process.
40 virtual void setReplicatedName(const WebString
&) const = 0;
42 virtual void DispatchLoadEventForFrameOwner() const = 0;
44 virtual void didStartLoading() = 0;
45 virtual void didStopLoading() = 0;
47 // Temporary method to allow embedders to get the script context of a
48 // remote frame. This should only be used by legacy code that has not yet
49 // migrated over to the new OOPI infrastructure.
50 virtual v8::Local
<v8::Context
> deprecatedMainWorldScriptContext() const = 0;
53 explicit WebRemoteFrame(WebTreeScopeType scope
) : WebFrame(scope
) { }
58 #endif // WebRemoteFrame_h