Chromium Code Reviews| 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 | 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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 916 | 916 |
| 917 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) | 917 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) |
| 918 : m_frame(&frame) { | 918 : m_frame(&frame) { |
| 919 m_frame->disableNavigation(); | 919 m_frame->disableNavigation(); |
| 920 } | 920 } |
| 921 | 921 |
| 922 FrameNavigationDisabler::~FrameNavigationDisabler() { | 922 FrameNavigationDisabler::~FrameNavigationDisabler() { |
| 923 m_frame->enableNavigation(); | 923 m_frame->enableNavigation(); |
| 924 } | 924 } |
| 925 | 925 |
| 926 bool LocalFrame::isNavigationAllowed() const { | |
| 927 return m_navigationDisableCount == 0; | |
| 928 } | |
|
dcheng
2017/01/09 19:17:30
Nit: revert this to the original (inlined in heade
lfg
2017/01/09 21:18:22
Done.
| |
| 929 | |
| 926 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { | 930 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { |
| 927 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 931 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 928 m_frame->client()->frameBlameContext()->Enter(); | 932 m_frame->client()->frameBlameContext()->Enter(); |
| 929 } | 933 } |
| 930 | 934 |
| 931 ScopedFrameBlamer::~ScopedFrameBlamer() { | 935 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 936 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 933 m_frame->client()->frameBlameContext()->Leave(); | 937 m_frame->client()->frameBlameContext()->Leave(); |
| 934 } | 938 } |
| 935 | 939 |
| 936 } // namespace blink | 940 } // namespace blink |
| OLD | NEW |