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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 void LocalFrame::scheduleVisualUpdateUnlessThrottled() { | 899 void LocalFrame::scheduleVisualUpdateUnlessThrottled() { |
899 if (shouldThrottleRendering()) | 900 if (shouldThrottleRendering()) |
900 return; | 901 return; |
901 page()->animator().scheduleVisualUpdate(this); | 902 page()->animator().scheduleVisualUpdate(this); |
902 } | 903 } |
903 | 904 |
904 LocalFrameClient* LocalFrame::client() const { | 905 LocalFrameClient* LocalFrame::client() const { |
905 return static_cast<LocalFrameClient*>(Frame::client()); | 906 return static_cast<LocalFrameClient*>(Frame::client()); |
906 } | 907 } |
907 | 908 |
| 909 ContentSettingsClient* LocalFrame::contentSettingsClient() { |
| 910 return client() ? &client()->contentSettingsClient() : nullptr; |
| 911 } |
| 912 |
908 PluginData* LocalFrame::pluginData() const { | 913 PluginData* LocalFrame::pluginData() const { |
909 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) | 914 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) |
910 return nullptr; | 915 return nullptr; |
911 return page()->pluginData( | 916 return page()->pluginData( |
912 tree().top()->securityContext()->getSecurityOrigin()); | 917 tree().top()->securityContext()->getSecurityOrigin()); |
913 } | 918 } |
914 | 919 |
915 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 920 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
916 | 921 |
917 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) | 922 FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame) |
918 : m_frame(&frame) { | 923 : m_frame(&frame) { |
919 m_frame->disableNavigation(); | 924 m_frame->disableNavigation(); |
920 } | 925 } |
921 | 926 |
922 FrameNavigationDisabler::~FrameNavigationDisabler() { | 927 FrameNavigationDisabler::~FrameNavigationDisabler() { |
923 m_frame->enableNavigation(); | 928 m_frame->enableNavigation(); |
924 } | 929 } |
925 | 930 |
926 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { | 931 ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { |
927 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
928 m_frame->client()->frameBlameContext()->Enter(); | 933 m_frame->client()->frameBlameContext()->Enter(); |
929 } | 934 } |
930 | 935 |
931 ScopedFrameBlamer::~ScopedFrameBlamer() { | 936 ScopedFrameBlamer::~ScopedFrameBlamer() { |
932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 937 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
933 m_frame->client()->frameBlameContext()->Leave(); | 938 m_frame->client()->frameBlameContext()->Leave(); |
934 } | 939 } |
935 | 940 |
936 } // namespace blink | 941 } // namespace blink |
OLD | NEW |