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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "WebFrameletImpl.h"
6
7 #include "core/html/HTMLFrameletElement.h"
8 #include "public/web/WebFrameletClient.h"
9
10 namespace blink {
11
12 WebFramelet* WebFramelet::create(WebFrameletClient* client)
13 {
14 return WebFrameletImpl::create(client);
15 }
16
17 WebFrameletImpl::WebFrameletImpl(WebFrameletClient* client)
18 : m_frameletClient(FrameletClientImpl::create(this))
19 , m_client(client)
20 {
21 ASSERT(client);
22 }
23
24 WebFrameletImpl::~WebFrameletImpl()
25 {
26 }
27
28 WebFrameletImpl* WebFrameletImpl::create(WebFrameletClient* client)
29 {
30 WebFrameletImpl* frame = new WebFrameletImpl(client);
31 #if ENABLE(OILPAN)
32 return frame;
33 #else
34 return adoptRef(frame).leakRef();
35 #endif
36 }
37
38 void WebFrameletImpl::close()
39 {
40 #if ENABLE(OILPAN)
41 m_selfKeepAlive.clear();
42 #else
43 deref();
44 #endif
45 }
46
47 void WebFrameletImpl::setWebLayer(WebLayer* webLayer)
48 {
49 if (!framelet())
50 return;
51
52 framelet()->setRemotePlatformLayer(webLayer);
53 }
54
55 WebFrameletClient* WebFrameletImpl::client()
56 {
57 return m_client;
58 }
59
60 void WebFrameletImpl::initializeCoreFramelet(FrameOwner* owner)
61 {
62 setCoreFramelet(Framelet::create(m_frameletClient.get(), owner));
63 framelet()->createView();
64 }
65
66 void WebFrameletImpl::setCoreFramelet(PassRefPtrWillBeRawPtr<Framelet> framelet)
67 {
68 m_framelet = framelet;
69 }
70
71 } // namespace blink
OLDNEW
« 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