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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 338993003: Cleanup various WebView/WebFrame APIs to properly handle remote frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unneeded header. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 , m_inputMethodController(InputMethodController::create(*this)) 99 , m_inputMethodController(InputMethodController::create(*this))
100 , m_pageZoomFactor(parentPageZoomFactor(this)) 100 , m_pageZoomFactor(parentPageZoomFactor(this))
101 , m_textZoomFactor(parentTextZoomFactor(this)) 101 , m_textZoomFactor(parentTextZoomFactor(this))
102 , m_inViewSourceMode(false) 102 , m_inViewSourceMode(false)
103 { 103 {
104 } 104 }
105 105
106 PassRefPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner) 106 PassRefPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner)
107 { 107 {
108 RefPtr<LocalFrame> frame = adoptRef(new LocalFrame(client, host, owner)); 108 RefPtr<LocalFrame> frame = adoptRef(new LocalFrame(client, host, owner));
109 // FIXME: Why is this here? RemoteFrames need this too.
110 if (!frame->owner())
111 frame->page()->setMainFrame(frame);
112 InspectorInstrumentation::frameAttachedToParent(frame.get()); 109 InspectorInstrumentation::frameAttachedToParent(frame.get());
113 return frame.release(); 110 return frame.release();
114 } 111 }
115 112
116 LocalFrame::~LocalFrame() 113 LocalFrame::~LocalFrame()
117 { 114 {
118 setView(nullptr); 115 setView(nullptr);
119 loader().clear(); 116 loader().clear();
120 setDOMWindow(nullptr); 117 setDOMWindow(nullptr);
121 } 118 }
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 LocalFrame* LocalFrame::localFrameRoot() 651 LocalFrame* LocalFrame::localFrameRoot()
655 { 652 {
656 LocalFrame* curFrame = this; 653 LocalFrame* curFrame = this;
657 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 654 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
658 curFrame = toLocalFrame(curFrame->tree().parent()); 655 curFrame = toLocalFrame(curFrame->tree().parent());
659 656
660 return curFrame; 657 return curFrame;
661 } 658 }
662 659
663 } // namespace WebCore 660 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/core/page/Page.h » ('j') | Source/core/page/Page.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698