| 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 USING_GARBAGE_COLLECTED_MIXIN(ContextFeatures); | 40 USING_GARBAGE_COLLECTED_MIXIN(ContextFeatures); |
| 41 public: | 41 public: |
| 42 typedef HeapSupplement<Page> SupplementType; | 42 typedef HeapSupplement<Page> SupplementType; |
| 43 #else | 43 #else |
| 44 class ContextFeatures : public RefCountedSupplement<Page, ContextFeatures> { | 44 class ContextFeatures : public RefCountedSupplement<Page, ContextFeatures> { |
| 45 public: | 45 public: |
| 46 typedef RefCountedSupplement<Page, ContextFeatures> SupplementType; | 46 typedef RefCountedSupplement<Page, ContextFeatures> SupplementType; |
| 47 #endif | 47 #endif |
| 48 enum FeatureType { | 48 enum FeatureType { |
| 49 DialogElement = 0, | 49 DialogElement = 0, |
| 50 StyleScoped, |
| 50 PagePopup, | 51 PagePopup, |
| 51 MutationEvents, | 52 MutationEvents, |
| 52 PushState, | 53 PushState, |
| 53 FeatureTypeSize // Should be the last entry. | 54 FeatureTypeSize // Should be the last entry. |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 static const char* supplementName(); | 57 static const char* supplementName(); |
| 57 static ContextFeatures* defaultSwitch(); | 58 static ContextFeatures* defaultSwitch(); |
| 58 static PassRefPtrWillBeRawPtr<ContextFeatures> create(PassOwnPtr<ContextFeat
uresClient>); | 59 static PassRefPtrWillBeRawPtr<ContextFeatures> create(PassOwnPtr<ContextFeat
uresClient>); |
| 59 | 60 |
| 60 static bool dialogElementEnabled(Document*); | 61 static bool dialogElementEnabled(Document*); |
| 62 static bool styleScopedEnabled(Document*); |
| 61 static bool pagePopupEnabled(Document*); | 63 static bool pagePopupEnabled(Document*); |
| 62 static bool mutationEventsEnabled(Document*); | 64 static bool mutationEventsEnabled(Document*); |
| 63 static bool pushStateEnabled(Document*); | 65 static bool pushStateEnabled(Document*); |
| 64 | 66 |
| 65 bool isEnabled(Document*, FeatureType, bool) const; | 67 bool isEnabled(Document*, FeatureType, bool) const; |
| 66 void urlDidChange(Document*); | 68 void urlDidChange(Document*); |
| 67 | 69 |
| 68 #if ENABLE(OILPAN) | 70 #if ENABLE(OILPAN) |
| 69 virtual void trace(Visitor* visitor) OVERRIDE { HeapSupplement<Page>::trace(
visitor); } | 71 virtual void trace(Visitor* visitor) OVERRIDE { HeapSupplement<Page>::trace(
visitor); } |
| 70 #endif | 72 #endif |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // See issue 294180 | 112 // See issue 294180 |
| 111 // | 113 // |
| 112 // if (m_client) | 114 // if (m_client) |
| 113 // return; | 115 // return; |
| 114 // m_client->urlDidChange(document); | 116 // m_client->urlDidChange(document); |
| 115 } | 117 } |
| 116 | 118 |
| 117 } // namespace WebCore | 119 } // namespace WebCore |
| 118 | 120 |
| 119 #endif // ContextFeatures_h | 121 #endif // ContextFeatures_h |
| OLD | NEW |