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

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, 10 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/RemoteBridgeFrameOwner.h" 21 #include "web/RemoteBridgeFrameOwner.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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 Frame* frame = toImplBase()->frame(); 261 Frame* frame = toImplBase()->frame();
262 if (!frame) 262 if (!frame)
263 return 0; 263 return 0;
264 // FIXME: It's not clear this should ever be called to find a remote frame. 264 // FIXME: It's not clear this should ever be called to find a remote frame.
265 // Perhaps just disallow that completely? 265 // Perhaps just disallow that completely?
266 return fromFrame(frame->tree().child(name)); 266 return fromFrame(frame->tree().child(name));
267 } 267 }
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 = RawPtr<Element>(webElement).get();
272 272
273 if (!element->isFrameOwnerElement()) 273 if (!element->isFrameOwnerElement())
274 return nullptr; 274 return nullptr;
275 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame()); 275 return fromFrame(toHTMLFrameOwnerElement(element)->contentFrame());
276 } 276 }
277 277
278 bool WebFrame::isLoading() const 278 bool WebFrame::isLoading() const
279 { 279 {
280 if (Frame* frame = toImplBase()->frame()) 280 if (Frame* frame = toImplBase()->frame())
281 return frame->isLoading(); 281 return frame->isLoading();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ 356 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \
357 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } 357 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); }
358 358
359 DEFINE_VISITOR_METHOD(Visitor*) 359 DEFINE_VISITOR_METHOD(Visitor*)
360 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 360 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
361 361
362 #undef DEFINE_VISITOR_METHOD 362 #undef DEFINE_VISITOR_METHOD
363 #endif 363 #endif
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698