| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 Value m_value; | 68 Value m_value; |
| 69 bool m_defaultValue; // Needs to be traked as a part of the signature since | 69 bool m_defaultValue; // Needs to be traked as a part of the signature since |
| 70 // it can be changed dynamically. | 70 // it can be changed dynamically. |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 static const char* supplementName(); | 73 static const char* supplementName(); |
| 74 static ContextFeaturesCache& from(Document&); | 74 static ContextFeaturesCache& from(Document&); |
| 75 | 75 |
| 76 Entry& entryFor(ContextFeatures::FeatureType type) { | 76 Entry& entryFor(ContextFeatures::FeatureType type) { |
| 77 size_t index = static_cast<size_t>(type); | 77 size_t index = static_cast<size_t>(type); |
| 78 ASSERT_WITH_SECURITY_IMPLICATION(index < ContextFeatures::FeatureTypeSize); | 78 SECURITY_DCHECK(index < ContextFeatures::FeatureTypeSize); |
| 79 return m_entries[index]; | 79 return m_entries[index]; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void validateAgainst(Document*); | 82 void validateAgainst(Document*); |
| 83 | 83 |
| 84 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<Document>::trace(visitor); } | 84 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<Document>::trace(visitor); } |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 String m_domain; | 87 String m_domain; |
| 88 Entry m_entries[ContextFeatures::FeatureTypeSize]; | 88 Entry m_entries[ContextFeatures::FeatureTypeSize]; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 switch (type) { | 139 switch (type) { |
| 140 case ContextFeatures::MutationEvents: | 140 case ContextFeatures::MutationEvents: |
| 141 return frame->contentSettingsClient()->allowMutationEvents(defaultValue); | 141 return frame->contentSettingsClient()->allowMutationEvents(defaultValue); |
| 142 default: | 142 default: |
| 143 return defaultValue; | 143 return defaultValue; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace blink | 147 } // namespace blink |
| OLD | NEW |