OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "Internals.h" | 27 #include "Internals.h" |
28 | 28 |
29 #include "CachedResourceLoader.h" | 29 #include "CachedResourceLoader.h" |
30 #include "Document.h" | 30 #include "Document.h" |
31 #include "Element.h" | 31 #include "Element.h" |
32 #include "ExceptionCode.h" | 32 #include "ExceptionCode.h" |
33 #include "InspectorController.h" | 33 #include "InspectorController.h" |
| 34 #include "MemoryCache.h" |
34 #include "NodeRenderingContext.h" | 35 #include "NodeRenderingContext.h" |
35 #include "Page.h" | 36 #include "Page.h" |
36 #include "RenderTreeAsText.h" | 37 #include "RenderTreeAsText.h" |
37 #include "ShadowContentElement.h" | 38 #include "ShadowContentElement.h" |
38 #include "ShadowRoot.h" | 39 #include "ShadowRoot.h" |
39 | 40 |
40 namespace WebCore { | 41 namespace WebCore { |
41 | 42 |
42 PassRefPtr<Internals> Internals::create() | 43 PassRefPtr<Internals> Internals::create() |
43 { | 44 { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 String Internals::shadowPseudoId(Element* element, ExceptionCode& ec) | 130 String Internals::shadowPseudoId(Element* element, ExceptionCode& ec) |
130 { | 131 { |
131 if (!element) { | 132 if (!element) { |
132 ec = INVALID_ACCESS_ERR; | 133 ec = INVALID_ACCESS_ERR; |
133 return String(); | 134 return String(); |
134 } | 135 } |
135 | 136 |
136 return element->shadowPseudoId().string(); | 137 return element->shadowPseudoId().string(); |
137 } | 138 } |
138 | 139 |
| 140 void Internals::disableMemoryCache(bool disabled) |
| 141 { |
| 142 WebCore::memoryCache()->setDisabled(disabled); |
| 143 } |
| 144 |
139 #if ENABLE(INSPECTOR) | 145 #if ENABLE(INSPECTOR) |
140 void Internals::setInspectorResourcesDataSizeLimits(Document* document, int maxi
mumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionCode& ec
) | 146 void Internals::setInspectorResourcesDataSizeLimits(Document* document, int maxi
mumResourcesContentSize, int maximumSingleResourceContentSize, ExceptionCode& ec
) |
141 { | 147 { |
142 if (!document || !document->page() || !document->page()->inspectorController
()) { | 148 if (!document || !document->page() || !document->page()->inspectorController
()) { |
143 ec = INVALID_ACCESS_ERR; | 149 ec = INVALID_ACCESS_ERR; |
144 return; | 150 return; |
145 } | 151 } |
146 document->page()->inspectorController()->setResourcesDataSizeLimitsFromInter
nals(maximumResourcesContentSize, maximumSingleResourceContentSize); | 152 document->page()->inspectorController()->setResourcesDataSizeLimitsFromInter
nals(maximumResourcesContentSize, maximumSingleResourceContentSize); |
147 } | 153 } |
148 #endif | 154 #endif |
149 | 155 |
150 } | 156 } |
OLD | NEW |