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

Unified Diff: Source/web/RemoteBridgeFrameOwner.h

Issue 910313004: Replace PlaceholderFrameOwner with RemoteBridgeFrameOwner. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Nit: remove newline Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/web/RemoteBridgeFrameOwner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/RemoteBridgeFrameOwner.h
diff --git a/Source/web/RemoteBridgeFrameOwner.h b/Source/web/RemoteBridgeFrameOwner.h
new file mode 100644
index 0000000000000000000000000000000000000000..84eb460ca2ea8f16c07ab96769dd4e88492325b2
--- /dev/null
+++ b/Source/web/RemoteBridgeFrameOwner.h
@@ -0,0 +1,54 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+#ifndef RemoteBridgeFrameOwner_h
+#define RemoteBridgeFrameOwner_h
+
+#include "core/frame/FrameOwner.h"
+#include "web/WebLocalFrameImpl.h"
+
+namespace blink {
+
+// Helper class to bridge communication for a frame with a remote parent.
+// Currently, it serves two purposes:
+// 1. Allows the local frame's loader to retrieve sandbox flags associated with
+// its owner element in another process.
+// 2. Trigger a load event on its owner element once it finishes a load.
+class RemoteBridgeFrameOwner : public NoBaseWillBeGarbageCollectedFinalized<RemoteBridgeFrameOwner>, public FrameOwner {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner);
+public:
+ static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags)
+ {
+ return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags));
+ }
+
+ virtual bool isLocal() const override
+ {
+ return false;
+ }
+
+ virtual SandboxFlags sandboxFlags() const override
+ {
+ return m_sandboxFlags;
+ }
+
+ void setSandboxFlags(SandboxFlags flags)
+ {
+ m_sandboxFlags = flags;
+ }
+
+ virtual void dispatchLoad() override;
+
+ virtual void trace(Visitor*) override;
+
+private:
+ RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFlags);
+
+ RefPtrWillBeMember<WebLocalFrameImpl> m_frame;
+ SandboxFlags m_sandboxFlags;
+};
+
+} // namespace blink
+
+#endif // RemoteBridgeFrameOwner_h
« no previous file with comments | « no previous file | Source/web/RemoteBridgeFrameOwner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698