| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 Supplement<Page>::from(page, supplementName())); | 124 Supplement<Page>::from(page, supplementName())); |
| 125 } | 125 } |
| 126 const char* InternalSettings::supplementName() { | 126 const char* InternalSettings::supplementName() { |
| 127 return "InternalSettings"; | 127 return "InternalSettings"; |
| 128 } | 128 } |
| 129 | 129 |
| 130 InternalSettings::~InternalSettings() {} | 130 InternalSettings::~InternalSettings() {} |
| 131 | 131 |
| 132 InternalSettings::InternalSettings(Page& page) | 132 InternalSettings::InternalSettings(Page& page) |
| 133 : InternalSettingsGenerated(&page), | 133 : InternalSettingsGenerated(&page), |
| 134 m_page(&page), | 134 Supplement<Page>(page), |
| 135 m_backup(&page.settings()) {} | 135 m_backup(&page.settings()) {} |
| 136 | 136 |
| 137 void InternalSettings::resetToConsistentState() { | 137 void InternalSettings::resetToConsistentState() { |
| 138 m_backup.restoreTo(settings()); | 138 m_backup.restoreTo(settings()); |
| 139 m_backup = Backup(settings()); | 139 m_backup = Backup(settings()); |
| 140 m_backup.m_originalTextAutosizingEnabled = | 140 m_backup.m_originalTextAutosizingEnabled = |
| 141 settings()->textAutosizingEnabled(); | 141 settings()->textAutosizingEnabled(); |
| 142 | 142 |
| 143 InternalSettingsGenerated::resetToConsistentState(); | 143 InternalSettingsGenerated::resetToConsistentState(); |
| 144 } | 144 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 364 } |
| 365 | 365 |
| 366 void InternalSettings::setDefaultVideoPosterURL( | 366 void InternalSettings::setDefaultVideoPosterURL( |
| 367 const String& url, | 367 const String& url, |
| 368 ExceptionState& exceptionState) { | 368 ExceptionState& exceptionState) { |
| 369 InternalSettingsGuardForSettings(); | 369 InternalSettingsGuardForSettings(); |
| 370 settings()->setDefaultVideoPosterURL(url); | 370 settings()->setDefaultVideoPosterURL(url); |
| 371 } | 371 } |
| 372 | 372 |
| 373 DEFINE_TRACE(InternalSettings) { | 373 DEFINE_TRACE(InternalSettings) { |
| 374 visitor->trace(m_page); | |
| 375 InternalSettingsGenerated::trace(visitor); | 374 InternalSettingsGenerated::trace(visitor); |
| 376 Supplement<Page>::trace(visitor); | 375 Supplement<Page>::trace(visitor); |
| 377 } | 376 } |
| 378 | 377 |
| 379 void InternalSettings::setAvailablePointerTypes( | 378 void InternalSettings::setAvailablePointerTypes( |
| 380 const String& pointers, | 379 const String& pointers, |
| 381 ExceptionState& exceptionState) { | 380 ExceptionState& exceptionState) { |
| 382 InternalSettingsGuardForSettings(); | 381 InternalSettingsGuardForSettings(); |
| 383 | 382 |
| 384 // Allow setting multiple pointer types by passing comma seperated list | 383 // Allow setting multiple pointer types by passing comma seperated list |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 RuntimeEnabledFeatures::setCompositorWorkerEnabled(enabled); | 527 RuntimeEnabledFeatures::setCompositorWorkerEnabled(enabled); |
| 529 } | 528 } |
| 530 | 529 |
| 531 void InternalSettings::setPresentationReceiver(bool enabled, | 530 void InternalSettings::setPresentationReceiver(bool enabled, |
| 532 ExceptionState& exceptionState) { | 531 ExceptionState& exceptionState) { |
| 533 InternalSettingsGuardForSettings(); | 532 InternalSettingsGuardForSettings(); |
| 534 settings()->setPresentationReceiver(enabled); | 533 settings()->setPresentationReceiver(enabled); |
| 535 } | 534 } |
| 536 | 535 |
| 537 } // namespace blink | 536 } // namespace blink |
| OLD | NEW |