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

Unified Diff: third_party/WebKit/Source/web/WebFrameletImpl.cpp

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 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 | « third_party/WebKit/Source/web/WebFrameletImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameletImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameletImpl.cpp b/third_party/WebKit/Source/web/WebFrameletImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f7617c89400485961087d01e58439922e80b00b0
--- /dev/null
+++ b/third_party/WebKit/Source/web/WebFrameletImpl.cpp
@@ -0,0 +1,71 @@
+// 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.
+
+#include "WebFrameletImpl.h"
+
+#include "core/html/HTMLFrameletElement.h"
+#include "public/web/WebFrameletClient.h"
+
+namespace blink {
+
+WebFramelet* WebFramelet::create(WebFrameletClient* client)
+{
+ return WebFrameletImpl::create(client);
+}
+
+WebFrameletImpl::WebFrameletImpl(WebFrameletClient* client)
+ : m_frameletClient(FrameletClientImpl::create(this))
+ , m_client(client)
+{
+ ASSERT(client);
+}
+
+WebFrameletImpl::~WebFrameletImpl()
+{
+}
+
+WebFrameletImpl* WebFrameletImpl::create(WebFrameletClient* client)
+{
+ WebFrameletImpl* frame = new WebFrameletImpl(client);
+#if ENABLE(OILPAN)
+ return frame;
+#else
+ return adoptRef(frame).leakRef();
+#endif
+}
+
+void WebFrameletImpl::close()
+{
+#if ENABLE(OILPAN)
+ m_selfKeepAlive.clear();
+#else
+ deref();
+#endif
+}
+
+void WebFrameletImpl::setWebLayer(WebLayer* webLayer)
+{
+ if (!framelet())
+ return;
+
+ framelet()->setRemotePlatformLayer(webLayer);
+}
+
+WebFrameletClient* WebFrameletImpl::client()
+{
+ return m_client;
+}
+
+void WebFrameletImpl::initializeCoreFramelet(FrameOwner* owner)
+{
+ setCoreFramelet(Framelet::create(m_frameletClient.get(), owner));
+ framelet()->createView();
+}
+
+void WebFrameletImpl::setCoreFramelet(PassRefPtrWillBeRawPtr<Framelet> framelet)
+{
+ m_framelet = framelet;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameletImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698