Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/public/web/WebRemoteFrame.h

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed most CR feedback from mkwst@, alexmos@ and dcheng@. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebRemoteFrame_h 5 #ifndef WebRemoteFrame_h
6 #define WebRemoteFrame_h 6 #define WebRemoteFrame_h
7 7
8 #include "public/web/WebContentSecurityPolicy.h"
8 #include "public/web/WebFrame.h" 9 #include "public/web/WebFrame.h"
9 #include "public/web/WebSandboxFlags.h" 10 #include "public/web/WebSandboxFlags.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 enum class WebTreeScopeType; 14 enum class WebTreeScopeType;
14 class WebFrameClient; 15 class WebFrameClient;
15 class WebRemoteFrameClient; 16 class WebRemoteFrameClient;
17 class WebString;
16 18
17 class WebRemoteFrame : public WebFrame { 19 class WebRemoteFrame : public WebFrame {
18 public: 20 public:
19 BLINK_EXPORT static WebRemoteFrame* create(WebTreeScopeType, WebRemoteFrameC lient*, WebFrame* opener = nullptr); 21 BLINK_EXPORT static WebRemoteFrame* create(WebTreeScopeType, WebRemoteFrameC lient*, WebFrame* opener = nullptr);
20 22
21 // Functions for the embedder replicate the frame tree between processes. 23 // Functions for the embedder replicate the frame tree between processes.
22 // TODO(dcheng): The embedder currently does not replicate local frames in 24 // TODO(dcheng): The embedder currently does not replicate local frames in
23 // insertion order, so the local child version takes a previous sibling to 25 // 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 // ensure that it is inserted into the correct location in the list of
25 // children. 27 // children.
26 virtual WebLocalFrame* createLocalChild(WebTreeScopeType, const WebString& n ame, const WebString& uniqueName, WebSandboxFlags, WebFrameClient*, WebFrame* pr eviousSibling, const WebFrameOwnerProperties&, WebFrame* opener) = 0; 28 virtual WebLocalFrame* createLocalChild(WebTreeScopeType, const WebString& n ame, const WebString& uniqueName, WebSandboxFlags, WebFrameClient*, WebFrame* pr eviousSibling, const WebFrameOwnerProperties&, WebFrame* opener) = 0;
27 29
28 virtual WebRemoteFrame* createRemoteChild(WebTreeScopeType, const WebString& name, const WebString& uniqueName, WebSandboxFlags, WebRemoteFrameClient*, WebF rame* opener) = 0; 30 virtual WebRemoteFrame* createRemoteChild(WebTreeScopeType, const WebString& name, const WebString& uniqueName, WebSandboxFlags, WebRemoteFrameClient*, WebF rame* opener) = 0;
29 31
30 // Transfer initial drawing parameters from a local frame. 32 // Transfer initial drawing parameters from a local frame.
31 virtual void initializeFromFrame(WebLocalFrame*) const = 0; 33 virtual void initializeFromFrame(WebLocalFrame*) const = 0;
32 34
33 // Set security origin replicated from another process. 35 // Set security origin replicated from another process.
34 virtual void setReplicatedOrigin(const WebSecurityOrigin&) const = 0; 36 virtual void setReplicatedOrigin(const WebSecurityOrigin&) const = 0;
35 37
36 // Set sandbox flags replicated from another process. 38 // Set sandbox flags replicated from another process.
37 virtual void setReplicatedSandboxFlags(WebSandboxFlags) const = 0; 39 virtual void setReplicatedSandboxFlags(WebSandboxFlags) const = 0;
38 40
39 // Set frame |name| and |uniqueName| replicated from another process. 41 // Set frame |name| and |uniqueName| replicated from another process.
40 virtual void setReplicatedName(const WebString& name, const WebString& uniqu eName) const = 0; 42 virtual void setReplicatedName(const WebString& name, const WebString& uniqu eName) const = 0;
41 43
44 // Adds |header| to the set of replicated CSP headers.
45 virtual void addReplicatedContentSecurityPolicyHeader(const WebString& heade rValue, WebContentSecurityPolicyType, WebContentSecurityPolicySource) const = 0;
46
47 // Resets replicated CSP headers to an empty set.
48 virtual void resetReplicatedContentSecurityPolicy() const = 0;
49
42 // Set frame enforcement of strict mixed content checking replicated from an other process. 50 // Set frame enforcement of strict mixed content checking replicated from an other process.
43 virtual void setReplicatedShouldEnforceStrictMixedContentChecking(bool) cons t = 0; 51 virtual void setReplicatedShouldEnforceStrictMixedContentChecking(bool) cons t = 0;
44 52
45 // Set the frame to a unique origin that is potentially trustworthy, 53 // Set the frame to a unique origin that is potentially trustworthy,
46 // replicated from another process. 54 // replicated from another process.
47 virtual void setReplicatedPotentiallyTrustworthyUniqueOrigin(bool) const = 0 ; 55 virtual void setReplicatedPotentiallyTrustworthyUniqueOrigin(bool) const = 0 ;
48 56
49 virtual void DispatchLoadEventForFrameOwner() const = 0; 57 virtual void DispatchLoadEventForFrameOwner() const = 0;
50 58
51 virtual void didStartLoading() = 0; 59 virtual void didStartLoading() = 0;
(...skipping 14 matching lines...) Expand all
66 // to call these on a WebRemoteFrame. 74 // to call these on a WebRemoteFrame.
67 bool isWebLocalFrame() const override = 0; 75 bool isWebLocalFrame() const override = 0;
68 WebLocalFrame* toWebLocalFrame() override = 0; 76 WebLocalFrame* toWebLocalFrame() override = 0;
69 bool isWebRemoteFrame() const override = 0; 77 bool isWebRemoteFrame() const override = 0;
70 WebRemoteFrame* toWebRemoteFrame() override = 0; 78 WebRemoteFrame* toWebRemoteFrame() override = 0;
71 }; 79 };
72 80
73 } // namespace blink 81 } // namespace blink
74 82
75 #endif // WebRemoteFrame_h 83 #endif // WebRemoteFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698