OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/frame/RemoteFrame.h" | 6 #include "core/frame/RemoteFrame.h" |
7 | 7 |
8 #include "bindings/core/v8/WindowProxy.h" | 8 #include "bindings/core/v8/WindowProxy.h" |
9 #include "bindings/core/v8/WindowProxyManager.h" | 9 #include "bindings/core/v8/WindowProxyManager.h" |
10 #include "core/dom/RemoteSecurityContext.h" | 10 #include "core/dom/RemoteSecurityContext.h" |
(...skipping 12 matching lines...) Expand all Loading... | |
23 | 23 |
24 namespace blink { | 24 namespace blink { |
25 | 25 |
26 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, FrameHost* host, Fram eOwner* owner) | 26 inline RemoteFrame::RemoteFrame(RemoteFrameClient* client, FrameHost* host, Fram eOwner* owner) |
27 : Frame(client, host, owner) | 27 : Frame(client, host, owner) |
28 , m_view(nullptr) | 28 , m_view(nullptr) |
29 , m_securityContext(RemoteSecurityContext::create()) | 29 , m_securityContext(RemoteSecurityContext::create()) |
30 , m_domWindow(RemoteDOMWindow::create(*this)) | 30 , m_domWindow(RemoteDOMWindow::create(*this)) |
31 , m_windowProxyManager(WindowProxyManager::create(*this)) | 31 , m_windowProxyManager(WindowProxyManager::create(*this)) |
32 , m_remotePlatformLayer(nullptr) | 32 , m_remotePlatformLayer(nullptr) |
33 , m_shouldEnforceStrictMixedContentChecking(false) | |
alexmos
2015/12/03 20:43:26
Would it make sense to store m_shouldEnforceStrict
estark
2015/12/04 00:19:32
Sure, that seems reasonable to me. Done.
| |
33 { | 34 { |
34 } | 35 } |
35 | 36 |
36 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* clien t, FrameHost* host, FrameOwner* owner) | 37 PassRefPtrWillBeRawPtr<RemoteFrame> RemoteFrame::create(RemoteFrameClient* clien t, FrameHost* host, FrameOwner* owner) |
37 { | 38 { |
38 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); | 39 return adoptRefWillBeNoop(new RemoteFrame(client, host, owner)); |
39 } | 40 } |
40 | 41 |
41 RemoteFrame::~RemoteFrame() | 42 RemoteFrame::~RemoteFrame() |
42 { | 43 { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 Frame::disconnectOwnerElement(); | 124 Frame::disconnectOwnerElement(); |
124 } | 125 } |
125 | 126 |
126 bool RemoteFrame::shouldClose() | 127 bool RemoteFrame::shouldClose() |
127 { | 128 { |
128 // TODO(nasko): Implement running the beforeunload handler in the actual | 129 // TODO(nasko): Implement running the beforeunload handler in the actual |
129 // LocalFrame running in a different process and getting back a real result. | 130 // LocalFrame running in a different process and getting back a real result. |
130 return true; | 131 return true; |
131 } | 132 } |
132 | 133 |
134 bool RemoteFrame::shouldEnforceStrictMixedContentChecking() const | |
135 { | |
136 return m_shouldEnforceStrictMixedContentChecking; | |
137 } | |
138 | |
133 void RemoteFrame::forwardInputEvent(Event* event) | 139 void RemoteFrame::forwardInputEvent(Event* event) |
134 { | 140 { |
135 remoteFrameClient()->forwardInputEvent(event); | 141 remoteFrameClient()->forwardInputEvent(event); |
136 } | 142 } |
137 | 143 |
138 void RemoteFrame::frameRectsChanged(const IntRect& frameRect) | 144 void RemoteFrame::frameRectsChanged(const IntRect& frameRect) |
139 { | 145 { |
140 remoteFrameClient()->frameRectsChanged(frameRect); | 146 remoteFrameClient()->frameRectsChanged(frameRect); |
141 } | 147 } |
142 | 148 |
(...skipping 12 matching lines...) Expand all Loading... | |
155 return; | 161 return; |
156 | 162 |
157 ASSERT(!deprecatedLocalOwner()->ownedWidget()); | 163 ASSERT(!deprecatedLocalOwner()->ownedWidget()); |
158 | 164 |
159 setView(RemoteFrameView::create(this)); | 165 setView(RemoteFrameView::create(this)); |
160 | 166 |
161 if (ownerLayoutObject()) | 167 if (ownerLayoutObject()) |
162 deprecatedLocalOwner()->setWidget(m_view); | 168 deprecatedLocalOwner()->setWidget(m_view); |
163 } | 169 } |
164 | 170 |
171 void RemoteFrame::setShouldEnforceStrictMixedContentChecking(bool shouldEnforce) | |
172 { | |
173 m_shouldEnforceStrictMixedContentChecking = shouldEnforce; | |
174 } | |
175 | |
165 RemoteFrameClient* RemoteFrame::remoteFrameClient() const | 176 RemoteFrameClient* RemoteFrame::remoteFrameClient() const |
166 { | 177 { |
167 return static_cast<RemoteFrameClient*>(client()); | 178 return static_cast<RemoteFrameClient*>(client()); |
168 } | 179 } |
169 | 180 |
170 void RemoteFrame::setRemotePlatformLayer(WebLayer* layer) | 181 void RemoteFrame::setRemotePlatformLayer(WebLayer* layer) |
171 { | 182 { |
172 if (m_remotePlatformLayer) | 183 if (m_remotePlatformLayer) |
173 GraphicsLayer::unregisterContentsLayer(m_remotePlatformLayer); | 184 GraphicsLayer::unregisterContentsLayer(m_remotePlatformLayer); |
174 m_remotePlatformLayer = layer; | 185 m_remotePlatformLayer = layer; |
175 if (m_remotePlatformLayer) | 186 if (m_remotePlatformLayer) |
176 GraphicsLayer::registerContentsLayer(layer); | 187 GraphicsLayer::registerContentsLayer(layer); |
177 | 188 |
178 ASSERT(owner()); | 189 ASSERT(owner()); |
179 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); | 190 toHTMLFrameOwnerElement(owner())->setNeedsCompositingUpdate(); |
180 } | 191 } |
181 | 192 |
182 } // namespace blink | 193 } // namespace blink |
OLD | NEW |