| 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 "public/web/WebFrame.h" | 6 #include "public/web/WebFrame.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/WindowProxyManager.h" | 8 #include "bindings/core/v8/WindowProxyManager.h" |
| 9 #include "core/frame/FrameHost.h" | 9 #include "core/frame/FrameHost.h" |
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return 0; | 270 return 0; |
| 271 // FIXME: It's not clear this should ever be called to find a remote frame. | 271 // FIXME: It's not clear this should ever be called to find a remote frame. |
| 272 // Perhaps just disallow that completely? | 272 // Perhaps just disallow that completely? |
| 273 return fromFrame(frame->tree().child(name)); | 273 return fromFrame(frame->tree().child(name)); |
| 274 } | 274 } |
| 275 | 275 |
| 276 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) | 276 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) |
| 277 { | 277 { |
| 278 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); | 278 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); |
| 279 | 279 |
| 280 if (!isHTMLFrameElementBase(element)) | 280 if (!element->isFrameOwnerElement()) |
| 281 return nullptr; | 281 return nullptr; |
| 282 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); | 282 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); |
| 283 } | 283 } |
| 284 | 284 |
| 285 bool WebFrame::isLoading() const | 285 bool WebFrame::isLoading() const |
| 286 { | 286 { |
| 287 if (Frame* frame = toCoreFrame(this)) | 287 if (Frame* frame = toCoreFrame(this)) |
| 288 return frame->isLoading(); | 288 return frame->isLoading(); |
| 289 return false; | 289 return false; |
| 290 } | 290 } |
| 291 | 291 |
| 292 WebFrame* WebFrame::fromFrame(Frame* frame) | 292 WebFrame* WebFrame::fromFrame(Frame* frame) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ | 363 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ |
| 364 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } | 364 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } |
| 365 | 365 |
| 366 DEFINE_VISITOR_METHOD(Visitor*) | 366 DEFINE_VISITOR_METHOD(Visitor*) |
| 367 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) | 367 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) |
| 368 | 368 |
| 369 #undef DEFINE_VISITOR_METHOD | 369 #undef DEFINE_VISITOR_METHOD |
| 370 #endif | 370 #endif |
| 371 | 371 |
| 372 } // namespace blink | 372 } // namespace blink |
| OLD | NEW |