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, | |
51 PagePopup, | 50 PagePopup, |
52 MutationEvents, | 51 MutationEvents, |
53 PushState, | 52 PushState, |
54 FeatureTypeSize // Should be the last entry. | 53 FeatureTypeSize // Should be the last entry. |
55 }; | 54 }; |
56 | 55 |
57 static const char* supplementName(); | 56 static const char* supplementName(); |
58 static ContextFeatures* defaultSwitch(); | 57 static ContextFeatures* defaultSwitch(); |
59 static PassRefPtrWillBeRawPtr<ContextFeatures> create(PassOwnPtr<ContextFeat
uresClient>); | 58 static PassRefPtrWillBeRawPtr<ContextFeatures> create(PassOwnPtr<ContextFeat
uresClient>); |
60 | 59 |
61 static bool dialogElementEnabled(Document*); | 60 static bool dialogElementEnabled(Document*); |
62 static bool styleScopedEnabled(Document*); | |
63 static bool pagePopupEnabled(Document*); | 61 static bool pagePopupEnabled(Document*); |
64 static bool mutationEventsEnabled(Document*); | 62 static bool mutationEventsEnabled(Document*); |
65 static bool pushStateEnabled(Document*); | 63 static bool pushStateEnabled(Document*); |
66 | 64 |
67 bool isEnabled(Document*, FeatureType, bool) const; | 65 bool isEnabled(Document*, FeatureType, bool) const; |
68 void urlDidChange(Document*); | 66 void urlDidChange(Document*); |
69 | 67 |
70 #if ENABLE(OILPAN) | 68 #if ENABLE(OILPAN) |
71 virtual void trace(Visitor* visitor) OVERRIDE { HeapSupplement<Page>::trace(
visitor); } | 69 virtual void trace(Visitor* visitor) OVERRIDE { HeapSupplement<Page>::trace(
visitor); } |
72 #endif | 70 #endif |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // See issue 294180 | 110 // See issue 294180 |
113 // | 111 // |
114 // if (m_client) | 112 // if (m_client) |
115 // return; | 113 // return; |
116 // m_client->urlDidChange(document); | 114 // m_client->urlDidChange(document); |
117 } | 115 } |
118 | 116 |
119 } // namespace WebCore | 117 } // namespace WebCore |
120 | 118 |
121 #endif // ContextFeatures_h | 119 #endif // ContextFeatures_h |
OLD | NEW |