Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "web/WebSettingsImpl.h" | 32 #include "web/WebSettingsImpl.h" |
| 33 | 33 |
| 34 #include "core/frame/Settings.h" | 34 #include "core/frame/Settings.h" |
| 35 #include "core/inspector/InspectorController.h" | 35 #include "core/inspector/InspectorController.h" |
| 36 #include "platform/graphics/DecodingImageGenerator.h" | |
| 36 #include "platform/graphics/DeferredImageDecoder.h" | 37 #include "platform/graphics/DeferredImageDecoder.h" |
| 37 | 38 |
| 38 #include "public/platform/WebString.h" | 39 #include "public/platform/WebString.h" |
| 39 #include "public/platform/WebURL.h" | 40 #include "public/platform/WebURL.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 WebSettingsImpl::WebSettingsImpl(Settings* settings, InspectorController* inspec torController) | 44 WebSettingsImpl::WebSettingsImpl(Settings* settings, InspectorController* inspec torController) |
| 44 : m_settings(settings) | 45 : m_settings(settings) |
| 45 , m_inspectorController(inspectorController) | 46 , m_inspectorController(inspectorController) |
| 46 , m_showFPSCounter(false) | 47 , m_showFPSCounter(false) |
| 47 , m_showPaintRects(false) | 48 , m_showPaintRects(false) |
| 48 , m_renderVSyncNotificationEnabled(false) | 49 , m_renderVSyncNotificationEnabled(false) |
| 49 , m_autoZoomFocusedNodeToLegibleScale(false) | 50 , m_autoZoomFocusedNodeToLegibleScale(false) |
| 50 , m_deferredImageDecodingEnabled(false) | 51 , m_deferredImageDecodingEnabled(false) |
| 51 , m_doubleTapToZoomEnabled(false) | 52 , m_doubleTapToZoomEnabled(false) |
| 52 , m_supportDeprecatedTargetDensityDPI(false) | 53 , m_supportDeprecatedTargetDensityDPI(false) |
| 53 , m_shrinksViewportContentToFit(false) | 54 , m_shrinksViewportContentToFit(false) |
| 54 , m_viewportMetaLayoutSizeQuirk(false) | 55 , m_viewportMetaLayoutSizeQuirk(false) |
| 55 , m_viewportMetaNonUserScalableQuirk(false) | 56 , m_viewportMetaNonUserScalableQuirk(false) |
| 56 , m_clobberUserAgentInitialScaleQuirk(false) | 57 , m_clobberUserAgentInitialScaleQuirk(false) |
| 57 , m_mainFrameResizesAreOrientationChanges(false) | 58 , m_mainFrameResizesAreOrientationChanges(false) |
| 59 , m_decodeToYUVEnabled(false) | |
| 58 { | 60 { |
| 59 ASSERT(settings); | 61 ASSERT(settings); |
| 60 } | 62 } |
| 61 | 63 |
| 62 void WebSettingsImpl::setStandardFontFamily(const WebString& font, UScriptCode s cript) | 64 void WebSettingsImpl::setStandardFontFamily(const WebString& font, UScriptCode s cript) |
| 63 { | 65 { |
| 64 if (m_settings->genericFontFamilySettings().updateStandard(font, script)) | 66 if (m_settings->genericFontFamilySettings().updateStandard(font, script)) |
| 65 m_settings->notifyGenericFontFamilyChange(); | 67 m_settings->notifyGenericFontFamilyChange(); |
| 66 } | 68 } |
| 67 | 69 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 { | 502 { |
| 501 m_settings->setContainerCullingEnabled(enabled); | 503 m_settings->setContainerCullingEnabled(enabled); |
| 502 } | 504 } |
| 503 | 505 |
| 504 void WebSettingsImpl::setDeferredImageDecodingEnabled(bool enabled) | 506 void WebSettingsImpl::setDeferredImageDecodingEnabled(bool enabled) |
| 505 { | 507 { |
| 506 DeferredImageDecoder::setEnabled(enabled); | 508 DeferredImageDecoder::setEnabled(enabled); |
| 507 m_deferredImageDecodingEnabled = enabled; | 509 m_deferredImageDecodingEnabled = enabled; |
| 508 } | 510 } |
| 509 | 511 |
| 512 void WebSettingsImpl::setDecodeToYUVEnabled(bool enabled) | |
| 513 { | |
| 514 DecodingImageGenerator::setDecodeToYUVEnabled(enabled); | |
| 515 m_decodeToYUVEnabled = enabled; | |
|
Stephen White
2014/09/26 19:31:00
Don't think there's any need for this.
| |
| 516 } | |
| 517 | |
| 510 void WebSettingsImpl::setDeferredFiltersEnabled(bool enabled) | 518 void WebSettingsImpl::setDeferredFiltersEnabled(bool enabled) |
| 511 { | 519 { |
| 512 m_settings->setDeferredFiltersEnabled(enabled); | 520 m_settings->setDeferredFiltersEnabled(enabled); |
| 513 } | 521 } |
| 514 | 522 |
| 515 void WebSettingsImpl::setPreferCompositingToLCDTextEnabled(bool enabled) | 523 void WebSettingsImpl::setPreferCompositingToLCDTextEnabled(bool enabled) |
| 516 { | 524 { |
| 517 m_inspectorController->setPreferCompositingToLCDTextEnabled(enabled); | 525 m_inspectorController->setPreferCompositingToLCDTextEnabled(enabled); |
| 518 } | 526 } |
| 519 | 527 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 731 { | 739 { |
| 732 m_settings->setV8CacheOptions(static_cast<blink::V8CacheOptions>(options)); | 740 m_settings->setV8CacheOptions(static_cast<blink::V8CacheOptions>(options)); |
| 733 } | 741 } |
| 734 | 742 |
| 735 void WebSettingsImpl::setV8ScriptStreamingEnabled(bool enabled) | 743 void WebSettingsImpl::setV8ScriptStreamingEnabled(bool enabled) |
| 736 { | 744 { |
| 737 m_settings->setV8ScriptStreamingEnabled(enabled); | 745 m_settings->setV8ScriptStreamingEnabled(enabled); |
| 738 } | 746 } |
| 739 | 747 |
| 740 } // namespace blink | 748 } // namespace blink |
| OLD | NEW |