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

Side by Side Diff: third_party/WebKit/Source/core/frame/Frame.cpp

Issue 2769263004: Remove Frame::host() method (Closed)
Patch Set: Created 3 years, 9 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 /* 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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 15 matching lines...) Expand all
26 * along with this library; see the file COPYING.LIB. If not, write to 26 * along with this library; see the file COPYING.LIB. If not, write to
27 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 27 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
28 * Boston, MA 02110-1301, USA. 28 * Boston, MA 02110-1301, USA.
29 */ 29 */
30 30
31 #include "core/frame/Frame.h" 31 #include "core/frame/Frame.h"
32 32
33 #include "bindings/core/v8/WindowProxyManager.h" 33 #include "bindings/core/v8/WindowProxyManager.h"
34 #include "core/dom/DocumentType.h" 34 #include "core/dom/DocumentType.h"
35 #include "core/events/Event.h" 35 #include "core/events/Event.h"
36 #include "core/frame/FrameHost.h"
37 #include "core/frame/LocalDOMWindow.h" 36 #include "core/frame/LocalDOMWindow.h"
38 #include "core/frame/Settings.h" 37 #include "core/frame/Settings.h"
39 #include "core/frame/UseCounter.h" 38 #include "core/frame/UseCounter.h"
40 #include "core/html/HTMLFrameElementBase.h" 39 #include "core/html/HTMLFrameElementBase.h"
41 #include "core/input/EventHandler.h" 40 #include "core/input/EventHandler.h"
42 #include "core/inspector/InspectorInstrumentation.h" 41 #include "core/inspector/InspectorInstrumentation.h"
43 #include "core/layout/LayoutPart.h" 42 #include "core/layout/LayoutPart.h"
44 #include "core/layout/api/LayoutPartItem.h" 43 #include "core/layout/api/LayoutPartItem.h"
45 #include "core/loader/EmptyClients.h" 44 #include "core/loader/EmptyClients.h"
46 #include "core/loader/NavigationScheduler.h" 45 #include "core/loader/NavigationScheduler.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (m_owner->contentFrame() == this) 90 if (m_owner->contentFrame() == this)
92 m_owner->clearContentFrame(); 91 m_owner->clearContentFrame();
93 m_owner = nullptr; 92 m_owner = nullptr;
94 } 93 }
95 } 94 }
96 95
97 Page* Frame::page() const { 96 Page* Frame::page() const {
98 return m_page; 97 return m_page;
99 } 98 }
100 99
101 FrameHost* Frame::host() const {
102 if (m_page)
103 return &m_page->frameHost();
104 return nullptr;
105 }
106
107 bool Frame::isMainFrame() const { 100 bool Frame::isMainFrame() const {
108 return !tree().parent(); 101 return !tree().parent();
109 } 102 }
110 103
111 bool Frame::isLocalRoot() const { 104 bool Frame::isLocalRoot() const {
112 if (isRemoteFrame()) 105 if (isRemoteFrame())
113 return false; 106 return false;
114 107
115 if (!tree().parent()) 108 if (!tree().parent())
116 return true; 109 return true;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 425
433 DCHECK(m_page); 426 DCHECK(m_page);
434 427
435 if (m_owner) 428 if (m_owner)
436 m_owner->setContentFrame(*this); 429 m_owner->setContentFrame(*this);
437 else 430 else
438 m_page->setMainFrame(this); 431 m_page->setMainFrame(this);
439 } 432 }
440 433
441 } // namespace blink 434 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698