Chromium Code Reviews| 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 "public/web/WebFrame.h" | 5 #include "public/web/WebFrame.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/WindowProxyManager.h" | 7 #include "bindings/core/v8/WindowProxyManager.h" |
| 8 #include "core/frame/FrameHost.h" | 8 #include "core/frame/FrameHost.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 | 266 |
| 267 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) | 267 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) |
| 268 { | 268 { |
| 269 Element* element = webElement; | 269 Element* element = webElement; |
| 270 | 270 |
| 271 if (!element->isFrameOwnerElement()) | 271 if (!element->isFrameOwnerElement()) |
| 272 return nullptr; | 272 return nullptr; |
| 273 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); | 273 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 bool WebFrame::canHaveSecureChild(WebString& errorMessage) const | |
|
jww
2016/05/28 01:35:25
Can you add some unit tests to this, similar to wh
falken
2016/05/30 10:20:53
Didn't get to this in the latest patchset, but wil
| |
| 277 { | |
| 278 Frame* frame = toImplBase()->frame(); | |
| 279 if (!frame) | |
| 280 return false; | |
| 281 String message; | |
| 282 bool result = frame->canHaveSecureChild(&message); | |
| 283 errorMessage = message; | |
| 284 return result; | |
| 285 } | |
| 286 | |
| 276 bool WebFrame::isLoading() const | 287 bool WebFrame::isLoading() const |
| 277 { | 288 { |
| 278 if (Frame* frame = toImplBase()->frame()) | 289 if (Frame* frame = toImplBase()->frame()) |
| 279 return frame->isLoading(); | 290 return frame->isLoading(); |
| 280 return false; | 291 return false; |
| 281 } | 292 } |
| 282 | 293 |
| 283 WebFrame* WebFrame::fromFrame(Frame* frame) | 294 WebFrame* WebFrame::fromFrame(Frame* frame) |
| 284 { | 295 { |
| 285 if (!frame) | 296 if (!frame) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 void WebFrame::traceFrame(VisitorDispatcher visitor, WebFrame* frame) { trac eFrameImpl(visitor, frame); } \ | 363 void WebFrame::traceFrame(VisitorDispatcher visitor, WebFrame* frame) { trac eFrameImpl(visitor, frame); } \ |
| 353 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ | 364 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ |
| 354 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } | 365 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } |
| 355 | 366 |
| 356 DEFINE_VISITOR_METHOD(Visitor*) | 367 DEFINE_VISITOR_METHOD(Visitor*) |
| 357 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) | 368 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) |
| 358 | 369 |
| 359 #undef DEFINE_VISITOR_METHOD | 370 #undef DEFINE_VISITOR_METHOD |
| 360 | 371 |
| 361 } // namespace blink | 372 } // namespace blink |
| OLD | NEW |