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 25 matching lines...) Expand all Loading... | |
36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class Document; | 40 class Document; |
41 class ExceptionState; | 41 class ExceptionState; |
42 class LocalFrame; | 42 class LocalFrame; |
43 class Page; | 43 class Page; |
44 class Settings; | 44 class Settings; |
45 | 45 |
46 #if ENABLE(OILPAN) | |
47 class InternalSettings FINAL : public InternalSettingsGenerated, public HeapSupp lement<Page> { | |
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InternalSettings); | |
49 #else | |
46 class InternalSettings FINAL : public InternalSettingsGenerated { | 50 class InternalSettings FINAL : public InternalSettingsGenerated { |
51 #endif | |
47 public: | 52 public: |
48 class Backup { | 53 class Backup { |
49 public: | 54 public: |
50 explicit Backup(Settings*); | 55 explicit Backup(Settings*); |
51 void restoreTo(Settings*); | 56 void restoreTo(Settings*); |
52 | 57 |
53 bool m_originalCSSExclusionsEnabled; | 58 bool m_originalCSSExclusionsEnabled; |
54 bool m_originalAuthorShadowDOMForAnyElementEnabled; | 59 bool m_originalAuthorShadowDOMForAnyElementEnabled; |
55 bool m_originalStyleScoped; | 60 bool m_originalStyleScoped; |
56 bool m_originalCSP; | 61 bool m_originalCSP; |
(...skipping 10 matching lines...) Expand all Loading... | |
67 bool m_originalCompositorDrivenAcceleratedScrollEnabled; | 72 bool m_originalCompositorDrivenAcceleratedScrollEnabled; |
68 bool m_originalLayerSquashingEnabled; | 73 bool m_originalLayerSquashingEnabled; |
69 bool m_originalPasswordGenerationDecorationEnabled; | 74 bool m_originalPasswordGenerationDecorationEnabled; |
70 }; | 75 }; |
71 | 76 |
72 static PassRefPtrWillBeRawPtr<InternalSettings> create(Page& page) | 77 static PassRefPtrWillBeRawPtr<InternalSettings> create(Page& page) |
73 { | 78 { |
74 return adoptRefWillBeNoop(new InternalSettings(page)); | 79 return adoptRefWillBeNoop(new InternalSettings(page)); |
75 } | 80 } |
76 static InternalSettings* from(Page&); | 81 static InternalSettings* from(Page&); |
77 void hostDestroyed() { m_page = 0; } | 82 |
83 #if !ENABLE(OILPAN) | |
84 void hostDestroyed() { m_page = nullptr; } | |
85 #endif | |
78 | 86 |
79 virtual ~InternalSettings(); | 87 virtual ~InternalSettings(); |
80 void resetToConsistentState(); | 88 void resetToConsistentState(); |
81 | 89 |
82 void setStandardFontFamily(const AtomicString& family, const String& script, ExceptionState&); | 90 void setStandardFontFamily(const AtomicString& family, const String& script, ExceptionState&); |
83 void setSerifFontFamily(const AtomicString& family, const String& script, Ex ceptionState&); | 91 void setSerifFontFamily(const AtomicString& family, const String& script, Ex ceptionState&); |
84 void setSansSerifFontFamily(const AtomicString& family, const String& script , ExceptionState&); | 92 void setSansSerifFontFamily(const AtomicString& family, const String& script , ExceptionState&); |
85 void setFixedFontFamily(const AtomicString& family, const String& script, Ex ceptionState&); | 93 void setFixedFontFamily(const AtomicString& family, const String& script, Ex ceptionState&); |
86 void setCursiveFontFamily(const AtomicString& family, const String& script, ExceptionState&); | 94 void setCursiveFontFamily(const AtomicString& family, const String& script, ExceptionState&); |
87 void setFantasyFontFamily(const AtomicString& family, const String& script, ExceptionState&); | 95 void setFantasyFontFamily(const AtomicString& family, const String& script, ExceptionState&); |
(...skipping 21 matching lines...) Expand all Loading... | |
109 // FIXME: The following are RuntimeEnabledFeatures and likely | 117 // FIXME: The following are RuntimeEnabledFeatures and likely |
110 // cannot be changed after process start. These setters should | 118 // cannot be changed after process start. These setters should |
111 // be removed or moved onto internals.runtimeFlags: | 119 // be removed or moved onto internals.runtimeFlags: |
112 void setAuthorShadowDOMForAnyElementEnabled(bool); | 120 void setAuthorShadowDOMForAnyElementEnabled(bool); |
113 void setCSSExclusionsEnabled(bool); | 121 void setCSSExclusionsEnabled(bool); |
114 void setLangAttributeAwareFormControlUIEnabled(bool); | 122 void setLangAttributeAwareFormControlUIEnabled(bool); |
115 void setOverlayScrollbarsEnabled(bool); | 123 void setOverlayScrollbarsEnabled(bool); |
116 void setStyleScopedEnabled(bool); | 124 void setStyleScopedEnabled(bool); |
117 void setExperimentalContentSecurityPolicyFeaturesEnabled(bool); | 125 void setExperimentalContentSecurityPolicyFeaturesEnabled(bool); |
118 | 126 |
119 virtual void trace(Visitor* visitor) OVERRIDE { InternalSettingsGenerated::t race(visitor); } | 127 virtual void trace(Visitor*) OVERRIDE; |
120 | 128 |
121 private: | 129 private: |
122 explicit InternalSettings(Page&); | 130 explicit InternalSettings(Page&); |
123 | 131 |
124 Settings* settings() const; | 132 Settings* settings() const; |
125 Page* page() const { return m_page; } | 133 Page* page() const { return m_page; } |
126 static const char* supplementName(); | 134 static const char* supplementName(); |
127 | 135 |
128 Page* m_page; | 136 RawPtrWillBeWeakMember<Page> m_page; |
haraken
2014/04/30 11:18:08
hmm, I'm not quite sure about this pointer.
- In
zerny-chromium
2014/04/30 11:46:53
That is because InternalSettingsGenerated is RefCo
haraken
2014/04/30 12:02:08
Makes sense.
| |
129 Backup m_backup; | 137 Backup m_backup; |
130 }; | 138 }; |
131 | 139 |
132 } // namespace WebCore | 140 } // namespace WebCore |
133 | 141 |
134 #endif | 142 #endif |
OLD | NEW |