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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "web/RemoteFrameOwner.h" 21 #include "web/RemoteFrameOwner.h"
22 #include "web/WebLocalFrameImpl.h" 22 #include "web/WebLocalFrameImpl.h"
23 #include "web/WebRemoteFrameImpl.h" 23 #include "web/WebRemoteFrameImpl.h"
24 #include <algorithm> 24 #include <algorithm>
25 25
26 namespace blink { 26 namespace blink {
27 27
28 bool WebFrame::swap(WebFrame* frame) 28 bool WebFrame::swap(WebFrame* frame)
29 { 29 {
30 using std::swap; 30 using std::swap;
31 RefPtrWillBeRawPtr<Frame> oldFrame = toImplBase()->frame(); 31 RawPtr<Frame> oldFrame = toImplBase()->frame();
32 #if !ENABLE(OILPAN) 32 #if !ENABLE(OILPAN)
33 RefPtr<WebFrameImplBase> protectThis = toImplBase(); 33 RefPtr<WebFrameImplBase> protectThis = toImplBase();
34 #endif 34 #endif
35 35
36 // Unload the current Document in this frame: this calls unload handlers, 36 // Unload the current Document in this frame: this calls unload handlers,
37 // detaches child frames, etc. Since this runs script, make sure this frame 37 // detaches child frames, etc. Since this runs script, make sure this frame
38 // wasn't detached before continuing with the swap. 38 // wasn't detached before continuing with the swap.
39 // FIXME: There is no unit test for this condition, so one needs to be 39 // FIXME: There is no unit test for this condition, so one needs to be
40 // written. 40 // written.
41 if (!oldFrame->prepareForCommit()) 41 if (!oldFrame->prepareForCommit())
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Frame* frame = toImplBase()->frame(); 269 Frame* frame = toImplBase()->frame();
270 if (!frame) 270 if (!frame)
271 return 0; 271 return 0;
272 // FIXME: It's not clear this should ever be called to find a remote frame. 272 // FIXME: It's not clear this should ever be called to find a remote frame.
273 // Perhaps just disallow that completely? 273 // Perhaps just disallow that completely?
274 return fromFrame(frame->tree().child(name)); 274 return fromFrame(frame->tree().child(name));
275 } 275 }
276 276
277 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement) 277 WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& webElement)
278 { 278 {
279 Element* element = PassRefPtrWillBeRawPtr<Element>(webElement).get(); 279 Element* element = RawPtr<Element>(webElement).get();
280 280
281 if (!element->isFrameOwnerElement()) 281 if (!element->isFrameOwnerElement())
282 return nullptr; 282 return nullptr;
283 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); 283 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame());
284 } 284 }
285 285
286 bool WebFrame::isLoading() const 286 bool WebFrame::isLoading() const
287 { 287 {
288 if (Frame* frame = toImplBase()->frame()) 288 if (Frame* frame = toImplBase()->frame())
289 return frame->isLoading(); 289 return frame->isLoading();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ 364 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \
365 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } 365 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); }
366 366
367 DEFINE_VISITOR_METHOD(Visitor*) 367 DEFINE_VISITOR_METHOD(Visitor*)
368 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 368 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
369 369
370 #undef DEFINE_VISITOR_METHOD 370 #undef DEFINE_VISITOR_METHOD
371 #endif 371 #endif
372 372
373 } // namespace blink 373 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFormElement.cpp ('k') | third_party/WebKit/Source/web/WebFrameImplBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698