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

Side by Side Diff: third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp

Issue 1807033003: Rewrite how RemoteFrameOwners retain life. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 found
3 // in the LICENSE file.
4
5 #include "web/RemoteBridgeFrameOwner.h"
6
7 #include "core/frame/LocalFrame.h"
8 #include "public/web/WebFrameClient.h"
9 #include "web/WebLocalFrameImpl.h"
10
11 namespace blink {
12
13 RemoteBridgeFrameOwner::RemoteBridgeFrameOwner(SandboxFlags flags, const WebFram eOwnerProperties& frameOwnerProperties)
14 : m_sandboxFlags(flags)
15 , m_scrolling(static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode) )
16 , m_marginWidth(frameOwnerProperties.marginWidth)
17 , m_marginHeight(frameOwnerProperties.marginHeight)
18 {
19 }
20
21 DEFINE_TRACE(RemoteBridgeFrameOwner)
22 {
23 visitor->trace(m_frame);
24 FrameOwner::trace(visitor);
25 }
26
27 void RemoteBridgeFrameOwner::setScrollingMode(WebFrameOwnerProperties::Scrolling Mode mode)
28 {
29 m_scrolling = static_cast<ScrollbarMode>(mode);
30 }
31
32 void RemoteBridgeFrameOwner::setContentFrame(Frame& frame)
33 {
34 m_frame = &frame;
35 }
36
37 void RemoteBridgeFrameOwner::clearContentFrame()
38 {
39 ASSERT(m_frame->owner() == this);
40 m_frame = nullptr;
41 }
42
43 void RemoteBridgeFrameOwner::dispatchLoad()
44 {
45 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(*m_f rame));
46 webFrame->client()->dispatchLoad();
47 }
48
49 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698