| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
| 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "core/HTMLNames.h" | 43 #include "core/HTMLNames.h" |
| 44 #include "core/dom/Document.h" | 44 #include "core/dom/Document.h" |
| 45 #include "core/dom/Element.h" | 45 #include "core/dom/Element.h" |
| 46 #include "core/dom/TaskRunnerHelper.h" | 46 #include "core/dom/TaskRunnerHelper.h" |
| 47 #include "core/dom/ViewportDescription.h" | 47 #include "core/dom/ViewportDescription.h" |
| 48 #include "core/editing/Editor.h" | 48 #include "core/editing/Editor.h" |
| 49 #include "core/events/GestureEvent.h" | 49 #include "core/events/GestureEvent.h" |
| 50 #include "core/events/KeyboardEvent.h" | 50 #include "core/events/KeyboardEvent.h" |
| 51 #include "core/events/MouseEvent.h" | 51 #include "core/events/MouseEvent.h" |
| 52 #include "core/events/PageTransitionEvent.h" | 52 #include "core/events/PageTransitionEvent.h" |
| 53 #include "core/frame/ContentSettingsClient.h" |
| 53 #include "core/frame/FrameView.h" | 54 #include "core/frame/FrameView.h" |
| 54 #include "core/frame/LocalDOMWindow.h" | 55 #include "core/frame/LocalDOMWindow.h" |
| 55 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
| 56 #include "core/frame/LocalFrameClient.h" | 57 #include "core/frame/LocalFrameClient.h" |
| 57 #include "core/frame/Settings.h" | 58 #include "core/frame/Settings.h" |
| 58 #include "core/frame/VisualViewport.h" | 59 #include "core/frame/VisualViewport.h" |
| 59 #include "core/frame/csp/ContentSecurityPolicy.h" | 60 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 60 #include "core/html/HTMLFormElement.h" | 61 #include "core/html/HTMLFormElement.h" |
| 61 #include "core/html/HTMLFrameOwnerElement.h" | 62 #include "core/html/HTMLFrameOwnerElement.h" |
| 62 #include "core/input/EventHandler.h" | 63 #include "core/input/EventHandler.h" |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 if (client()) | 549 if (client()) |
| 549 client()->setOpener(opener); | 550 client()->setOpener(opener); |
| 550 } | 551 } |
| 551 | 552 |
| 552 bool FrameLoader::allowPlugins(ReasonForCallingAllowPlugins reason) { | 553 bool FrameLoader::allowPlugins(ReasonForCallingAllowPlugins reason) { |
| 553 // With Oilpan, a FrameLoader might be accessed after the Page has been | 554 // With Oilpan, a FrameLoader might be accessed after the Page has been |
| 554 // detached. FrameClient will not be accessible, so bail early. | 555 // detached. FrameClient will not be accessible, so bail early. |
| 555 if (!client()) | 556 if (!client()) |
| 556 return false; | 557 return false; |
| 557 Settings* settings = m_frame->settings(); | 558 Settings* settings = m_frame->settings(); |
| 558 bool allowed = | 559 bool allowed = m_frame->contentSettingsClient()->allowPlugins( |
| 559 client()->allowPlugins(settings && settings->getPluginsEnabled()); | 560 settings && settings->getPluginsEnabled()); |
| 560 if (!allowed && reason == AboutToInstantiatePlugin) | 561 if (!allowed && reason == AboutToInstantiatePlugin) |
| 561 client()->didNotAllowPlugins(); | 562 m_frame->contentSettingsClient()->didNotAllowPlugins(); |
| 562 return allowed; | 563 return allowed; |
| 563 } | 564 } |
| 564 | 565 |
| 565 void FrameLoader::updateForSameDocumentNavigation( | 566 void FrameLoader::updateForSameDocumentNavigation( |
| 566 const KURL& newURL, | 567 const KURL& newURL, |
| 567 SameDocumentNavigationSource sameDocumentNavigationSource, | 568 SameDocumentNavigationSource sameDocumentNavigationSource, |
| 568 PassRefPtr<SerializedScriptValue> data, | 569 PassRefPtr<SerializedScriptValue> data, |
| 569 HistoryScrollRestorationType scrollRestorationType, | 570 HistoryScrollRestorationType scrollRestorationType, |
| 570 FrameLoadType type, | 571 FrameLoadType type, |
| 571 Document* initiatingDocument) { | 572 Document* initiatingDocument) { |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1752 // TODO(japhet): This is needed because the browser process DCHECKs if the |
| 1752 // first entry we commit in a new frame has replacement set. It's unclear | 1753 // first entry we commit in a new frame has replacement set. It's unclear |
| 1753 // whether the DCHECK is right, investigate removing this special case. | 1754 // whether the DCHECK is right, investigate removing this special case. |
| 1754 bool replaceCurrentItem = loadType == FrameLoadTypeReplaceCurrentItem && | 1755 bool replaceCurrentItem = loadType == FrameLoadTypeReplaceCurrentItem && |
| 1755 (!opener() || !request.url().isEmpty()); | 1756 (!opener() || !request.url().isEmpty()); |
| 1756 loader->setReplacesCurrentHistoryItem(replaceCurrentItem); | 1757 loader->setReplacesCurrentHistoryItem(replaceCurrentItem); |
| 1757 return loader; | 1758 return loader; |
| 1758 } | 1759 } |
| 1759 | 1760 |
| 1760 } // namespace blink | 1761 } // namespace blink |
| OLD | NEW |