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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) | 269 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) |
270 { | 270 { |
271 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); | 271 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); |
272 | 272 |
273 if (!isHTMLFrameElementBase(element)) | 273 if (!isHTMLFrameElementBase(element)) |
274 return nullptr; | 274 return nullptr; |
275 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); | 275 return fromFrame(toHTMLFrameElementBase(element)->contentFrame()); |
276 } | 276 } |
277 | 277 |
| 278 bool WebFrame::isLoading() const |
| 279 { |
| 280 if (Frame* frame = toCoreFrame(this)) |
| 281 return frame->isLoading(); |
| 282 return false; |
| 283 } |
| 284 |
278 WebFrame* WebFrame::fromFrame(Frame* frame) | 285 WebFrame* WebFrame::fromFrame(Frame* frame) |
279 { | 286 { |
280 if (!frame) | 287 if (!frame) |
281 return 0; | 288 return 0; |
282 | 289 |
283 if (frame->isLocalFrame()) | 290 if (frame->isLocalFrame()) |
284 return WebLocalFrameImpl::fromFrame(toLocalFrame(*frame)); | 291 return WebLocalFrameImpl::fromFrame(toLocalFrame(*frame)); |
285 return WebRemoteFrameImpl::fromFrame(toRemoteFrame(*frame)); | 292 return WebRemoteFrameImpl::fromFrame(toRemoteFrame(*frame)); |
286 } | 293 } |
287 | 294 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ | 356 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra
ceFramesImpl(visitor, frame); } \ |
350 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } | 357 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI
mpl(visitor); } |
351 | 358 |
352 DEFINE_VISITOR_METHOD(Visitor*) | 359 DEFINE_VISITOR_METHOD(Visitor*) |
353 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) | 360 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) |
354 | 361 |
355 #undef DEFINE_VISITOR_METHOD | 362 #undef DEFINE_VISITOR_METHOD |
356 #endif | 363 #endif |
357 | 364 |
358 } // namespace blink | 365 } // namespace blink |
OLD | NEW |