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 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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef InspectorPageAgent_h | 31 #ifndef InspectorPageAgent_h |
32 #define InspectorPageAgent_h | 32 #define InspectorPageAgent_h |
33 | 33 |
34 | 34 |
35 #include "InspectorFrontend.h" | 35 #include "InspectorFrontend.h" |
| 36 #include "core/fetch/TextResourceDecoder.h" |
36 #include "core/inspector/InspectorBaseAgent.h" | 37 #include "core/inspector/InspectorBaseAgent.h" |
37 #include "modules/device_orientation/DeviceOrientationData.h" | 38 #include "modules/device_orientation/DeviceOrientationData.h" |
38 #include "modules/geolocation/GeolocationPosition.h" | 39 #include "modules/geolocation/GeolocationPosition.h" |
39 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
40 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
41 | 42 |
42 namespace WebCore { | 43 namespace WebCore { |
43 | 44 |
| 45 class Blob; |
44 class Resource; | 46 class Resource; |
45 class DOMWrapperWorld; | 47 class DOMWrapperWorld; |
46 class Document; | 48 class Document; |
47 class DocumentLoader; | 49 class DocumentLoader; |
48 class Frame; | 50 class Frame; |
49 class GraphicsContext; | 51 class GraphicsContext; |
50 class InjectedScriptManager; | 52 class InjectedScriptManager; |
51 class InspectorClient; | 53 class InspectorClient; |
52 class InspectorOverlay; | 54 class InspectorOverlay; |
53 class InstrumentingAgents; | 55 class InstrumentingAgents; |
(...skipping 15 matching lines...) Expand all Loading... |
69 ImageResource, | 71 ImageResource, |
70 Font, | 72 Font, |
71 ScriptResource, | 73 ScriptResource, |
72 XHRResource, | 74 XHRResource, |
73 WebSocketResource, | 75 WebSocketResource, |
74 OtherResource | 76 OtherResource |
75 }; | 77 }; |
76 | 78 |
77 static PassOwnPtr<InspectorPageAgent> create(InstrumentingAgents*, Page*, In
spectorCompositeState*, InjectedScriptManager*, InspectorClient*, InspectorOverl
ay*); | 79 static PassOwnPtr<InspectorPageAgent> create(InstrumentingAgents*, Page*, In
spectorCompositeState*, InjectedScriptManager*, InspectorClient*, InspectorOverl
ay*); |
78 | 80 |
79 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); | 81 static bool cachedResourceContentOrBlob(Resource*, String* result, bool* bas
e64Encoded, RefPtr<Blob>*, String* textEncodingName); |
80 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); | 82 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); |
81 static void resourceContent(ErrorString*, Frame*, const KURL&, String* resul
t, bool* base64Encoded); | 83 static void resourceContentOrBlob(ErrorString*, Frame*, const KURL&, String*
result, bool* base64Encoded, RefPtr<Blob>*, String* textEncodingName); |
| 84 static PassRefPtr<TextResourceDecoder> createXHRTextDecoder(const String& mi
meType, const String& textEncodingName); |
82 | 85 |
83 static PassRefPtr<SharedBuffer> resourceData(Frame*, const KURL&, String* te
xtEncodingName); | 86 static PassRefPtr<SharedBuffer> resourceData(Frame*, const KURL&, String* te
xtEncodingName); |
84 static Resource* cachedResource(Frame*, const KURL&); | 87 static Resource* cachedResource(Frame*, const KURL&); |
85 static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType); | 88 static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType); |
86 static ResourceType cachedResourceType(const Resource&); | 89 static ResourceType cachedResourceType(const Resource&); |
87 static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const Re
source&); | 90 static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const Re
source&); |
88 | 91 |
89 // Page API for InspectorFrontend | 92 // Page API for InspectorFrontend |
90 virtual void enable(ErrorString*); | 93 virtual void enable(ErrorString*); |
91 virtual void disable(ErrorString*); | 94 virtual void disable(ErrorString*); |
92 virtual void addScriptToEvaluateOnLoad(ErrorString*, const String& source, S
tring* result); | 95 virtual void addScriptToEvaluateOnLoad(ErrorString*, const String& source, S
tring* result); |
93 virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identi
fier); | 96 virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identi
fier); |
94 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const Str
ing* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor); | 97 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const Str
ing* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor); |
95 virtual void navigate(ErrorString*, const String& url); | 98 virtual void navigate(ErrorString*, const String& url); |
96 virtual void getNavigationHistory(ErrorString*, int*, RefPtr<TypeBuilder::Ar
ray<TypeBuilder::Page::NavigationEntry> >&); | 99 virtual void getNavigationHistory(ErrorString*, int*, RefPtr<TypeBuilder::Ar
ray<TypeBuilder::Page::NavigationEntry> >&); |
97 virtual void navigateToHistoryEntry(ErrorString*, int); | 100 virtual void navigateToHistoryEntry(ErrorString*, int); |
98 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder:
:Page::Cookie> >& cookies, WTF::String* cookiesString); | 101 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder:
:Page::Cookie> >& cookies, WTF::String* cookiesString); |
99 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri
ng& url); | 102 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri
ng& url); |
100 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe
sourceTree>&); | 103 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe
sourceTree>&); |
101 virtual void getResourceContent(ErrorString*, const String& frameId, const S
tring& url, String* content, bool* base64Encoded); | 104 virtual void getResourceContent(ErrorString*, const String& frameId, const S
tring& url, PassRefPtr<GetResourceContentCallback>); |
102 virtual void searchInResource(ErrorString*, const String& frameId, const Str
ing& url, const String& query, const bool* optionalCaseSensitive, const bool* op
tionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&); | 105 virtual void searchInResource(ErrorString*, const String& frameId, const Str
ing& url, const String& query, const bool* optionalCaseSensitive, const bool* op
tionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&); |
103 virtual void searchInResources(ErrorString*, const String&, const bool* case
Sensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Sea
rchResult> >&); | 106 virtual void searchInResources(ErrorString*, const String&, const bool* case
Sensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Sea
rchResult> >&); |
104 virtual void setDocumentContent(ErrorString*, const String& frameId, const S
tring& html); | 107 virtual void setDocumentContent(ErrorString*, const String& frameId, const S
tring& html); |
105 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d
ouble fontScaleFactor, bool fitWindow); | 108 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d
ouble fontScaleFactor, bool fitWindow); |
106 virtual void setShowPaintRects(ErrorString*, bool show); | 109 virtual void setShowPaintRects(ErrorString*, bool show); |
107 virtual void setShowDebugBorders(ErrorString*, bool show); | 110 virtual void setShowDebugBorders(ErrorString*, bool show); |
108 virtual void setShowFPSCounter(ErrorString*, bool show); | 111 virtual void setShowFPSCounter(ErrorString*, bool show); |
109 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled); | 112 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled); |
110 virtual void setShowScrollBottleneckRects(ErrorString*, bool show); | 113 virtual void setShowScrollBottleneckRects(ErrorString*, bool show); |
111 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu
lt::Enum*); | 114 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu
lt::Enum*); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 RefPtr<GeolocationPosition> m_geolocationPosition; | 212 RefPtr<GeolocationPosition> m_geolocationPosition; |
210 RefPtr<GeolocationPosition> m_platformGeolocationPosition; | 213 RefPtr<GeolocationPosition> m_platformGeolocationPosition; |
211 RefPtr<DeviceOrientationData> m_deviceOrientation; | 214 RefPtr<DeviceOrientationData> m_deviceOrientation; |
212 }; | 215 }; |
213 | 216 |
214 | 217 |
215 } // namespace WebCore | 218 } // namespace WebCore |
216 | 219 |
217 | 220 |
218 #endif // !defined(InspectorPagerAgent_h) | 221 #endif // !defined(InspectorPagerAgent_h) |
OLD | NEW |