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 26 matching lines...) Expand all Loading... |
37 #include "core/dom/ChildFrameDisconnector.h" | 37 #include "core/dom/ChildFrameDisconnector.h" |
38 #include "core/dom/DocumentType.h" | 38 #include "core/dom/DocumentType.h" |
39 #include "core/dom/StyleChangeReason.h" | 39 #include "core/dom/StyleChangeReason.h" |
40 #include "core/editing/EditingUtilities.h" | 40 #include "core/editing/EditingUtilities.h" |
41 #include "core/editing/Editor.h" | 41 #include "core/editing/Editor.h" |
42 #include "core/editing/FrameSelection.h" | 42 #include "core/editing/FrameSelection.h" |
43 #include "core/editing/InputMethodController.h" | 43 #include "core/editing/InputMethodController.h" |
44 #include "core/editing/serializers/Serialization.h" | 44 #include "core/editing/serializers/Serialization.h" |
45 #include "core/editing/spellcheck/SpellChecker.h" | 45 #include "core/editing/spellcheck/SpellChecker.h" |
46 #include "core/events/Event.h" | 46 #include "core/events/Event.h" |
| 47 #include "core/frame/ContentSettingsClient.h" |
47 #include "core/frame/EventHandlerRegistry.h" | 48 #include "core/frame/EventHandlerRegistry.h" |
48 #include "core/frame/FrameConsole.h" | 49 #include "core/frame/FrameConsole.h" |
49 #include "core/frame/FrameView.h" | 50 #include "core/frame/FrameView.h" |
50 #include "core/frame/LocalDOMWindow.h" | 51 #include "core/frame/LocalDOMWindow.h" |
51 #include "core/frame/LocalFrameClient.h" | 52 #include "core/frame/LocalFrameClient.h" |
52 #include "core/frame/PerformanceMonitor.h" | 53 #include "core/frame/PerformanceMonitor.h" |
53 #include "core/frame/Settings.h" | 54 #include "core/frame/Settings.h" |
54 #include "core/frame/VisualViewport.h" | 55 #include "core/frame/VisualViewport.h" |
55 #include "core/html/HTMLFrameElementBase.h" | 56 #include "core/html/HTMLFrameElementBase.h" |
56 #include "core/html/HTMLPlugInElement.h" | 57 #include "core/html/HTMLPlugInElement.h" |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 void LocalFrame::scheduleVisualUpdateUnlessThrottled() { | 873 void LocalFrame::scheduleVisualUpdateUnlessThrottled() { |
873 if (shouldThrottleRendering()) | 874 if (shouldThrottleRendering()) |
874 return; | 875 return; |
875 page()->animator().scheduleVisualUpdate(this); | 876 page()->animator().scheduleVisualUpdate(this); |
876 } | 877 } |
877 | 878 |
878 LocalFrameClient* LocalFrame::client() const { | 879 LocalFrameClient* LocalFrame::client() const { |
879 return static_cast<LocalFrameClient*>(Frame::client()); | 880 return static_cast<LocalFrameClient*>(Frame::client()); |
880 } | 881 } |
881 | 882 |
| 883 ContentSettingsClient* LocalFrame::contentSettingsClient() { |
| 884 return client() ? client()->contentSettingsClient() : nullptr; |
| 885 } |
| 886 |
882 PluginData* LocalFrame::pluginData() const { | 887 PluginData* LocalFrame::pluginData() const { |
883 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) | 888 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) |
884 return nullptr; | 889 return nullptr; |
885 return page()->pluginData( | 890 return page()->pluginData( |
886 tree().top()->securityContext()->getSecurityOrigin()); | 891 tree().top()->securityContext()->getSecurityOrigin()); |
887 } | 892 } |
888 | 893 |
889 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 894 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
890 | 895 |
891 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) | 896 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) |
892 : m_frame(&frame) { | 897 : m_frame(&frame) { |
893 m_frame->disableNavigation(); | 898 m_frame->disableNavigation(); |
894 } | 899 } |
895 | 900 |
896 FrameNavigationDisabler::~FrameNavigationDisabler() { | 901 FrameNavigationDisabler::~FrameNavigationDisabler() { |
897 m_frame->enableNavigation(); | 902 m_frame->enableNavigation(); |
898 } | 903 } |
899 | 904 |
900 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { | 905 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { |
901 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 906 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
902 m_frame->client()->frameBlameContext()->Enter(); | 907 m_frame->client()->frameBlameContext()->Enter(); |
903 } | 908 } |
904 | 909 |
905 ScopedFrameBlamer::~ScopedFrameBlamer() { | 910 ScopedFrameBlamer::~ScopedFrameBlamer() { |
906 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 911 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
907 m_frame->client()->frameBlameContext()->Leave(); | 912 m_frame->client()->frameBlameContext()->Leave(); |
908 } | 913 } |
909 | 914 |
910 } // namespace blink | 915 } // namespace blink |
OLD | NEW |