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

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

Issue 1802953003: RemoteBridgeFrameOwner: keep better track of the attached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Doing work in constructors is evil. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp
diff --git a/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp b/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp
index 3f64db29b9a7c4c64a965daec81a3bc225c284a4..9f3a908586598001eaf940ef07d887228c97b2f6 100644
--- a/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp
+++ b/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.cpp
@@ -4,13 +4,14 @@
#include "web/RemoteBridgeFrameOwner.h"
+#include "core/frame/LocalFrame.h"
#include "public/web/WebFrameClient.h"
+#include "web/WebLocalFrameImpl.h"
namespace blink {
-RemoteBridgeFrameOwner::RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
- : m_frame(frame)
- , m_sandboxFlags(flags)
+RemoteBridgeFrameOwner::RemoteBridgeFrameOwner(SandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
+ : m_sandboxFlags(flags)
, m_scrolling(static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode))
, m_marginWidth(frameOwnerProperties.marginWidth)
, m_marginHeight(frameOwnerProperties.marginHeight)
@@ -28,10 +29,21 @@ void RemoteBridgeFrameOwner::setScrollingMode(WebFrameOwnerProperties::Scrolling
m_scrolling = static_cast<ScrollbarMode>(mode);
}
+void RemoteBridgeFrameOwner::setContentFrame(Frame& frame)
+{
+ m_frame = &frame;
+}
+
+void RemoteBridgeFrameOwner::clearContentFrame()
+{
+ ASSERT(m_frame->owner() == this);
+ m_frame = nullptr;
+}
+
void RemoteBridgeFrameOwner::dispatchLoad()
{
- if (m_frame->client())
- m_frame->client()->dispatchLoad();
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame));
+ webFrame->client()->dispatchLoad();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698