OLD | NEW |
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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 return static_cast<FrameLoaderClient*>(Frame::client()); | 839 return static_cast<FrameLoaderClient*>(Frame::client()); |
840 } | 840 } |
841 | 841 |
842 PluginData* LocalFrame::pluginData() const | 842 PluginData* LocalFrame::pluginData() const |
843 { | 843 { |
844 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) | 844 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) |
845 return nullptr; | 845 return nullptr; |
846 return page()->pluginData(); | 846 return page()->pluginData(); |
847 } | 847 } |
848 | 848 |
| 849 void LocalFrame::purgeMemory() |
| 850 { |
| 851 if (!document()) |
| 852 return; |
| 853 document()->purgeMemory(); |
| 854 } |
| 855 |
849 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 856 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
850 | 857 |
851 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) | 858 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) |
852 : m_frame(&frame) | 859 : m_frame(&frame) |
853 { | 860 { |
854 m_frame->disableNavigation(); | 861 m_frame->disableNavigation(); |
855 } | 862 } |
856 | 863 |
857 FrameNavigationDisabler::~FrameNavigationDisabler() | 864 FrameNavigationDisabler::~FrameNavigationDisabler() |
858 { | 865 { |
859 m_frame->enableNavigation(); | 866 m_frame->enableNavigation(); |
860 } | 867 } |
861 | 868 |
862 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) | 869 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) |
863 : m_frame(frame) | 870 : m_frame(frame) |
864 { | 871 { |
865 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 872 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
866 m_frame->client()->frameBlameContext()->Enter(); | 873 m_frame->client()->frameBlameContext()->Enter(); |
867 } | 874 } |
868 | 875 |
869 ScopedFrameBlamer::~ScopedFrameBlamer() | 876 ScopedFrameBlamer::~ScopedFrameBlamer() |
870 { | 877 { |
871 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 878 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
872 m_frame->client()->frameBlameContext()->Leave(); | 879 m_frame->client()->frameBlameContext()->Leave(); |
873 } | 880 } |
874 | 881 |
875 } // namespace blink | 882 } // namespace blink |
OLD | NEW |