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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ImageResource, | 71 ImageResource, |
72 FontResource, | 72 FontResource, |
73 MediaResource, | 73 MediaResource, |
74 ScriptResource, | 74 ScriptResource, |
75 TextTrackResource, | 75 TextTrackResource, |
76 XHRResource, | 76 XHRResource, |
77 WebSocketResource, | 77 WebSocketResource, |
78 OtherResource | 78 OtherResource |
79 }; | 79 }; |
80 | 80 |
81 static PassOwnPtr<InspectorPageAgent> create(Page*, InjectedScriptManager*,
InspectorClient*, InspectorOverlay*); | 81 static PassOwnPtrWillBeRawPtr<InspectorPageAgent> create(Page*, InjectedScri
ptManager*, InspectorClient*, InspectorOverlay*); |
82 | 82 |
83 // Settings overrides. | 83 // Settings overrides. |
84 void setTextAutosizingEnabled(bool); | 84 void setTextAutosizingEnabled(bool); |
85 void setDeviceScaleAdjustment(float); | 85 void setDeviceScaleAdjustment(float); |
86 | 86 |
87 static Vector<Document*> importsForFrame(LocalFrame*); | 87 static Vector<Document*> importsForFrame(LocalFrame*); |
88 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); | 88 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); |
89 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); | 89 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); |
90 | 90 |
91 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); | 91 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 LocalFrame* assertFrame(ErrorString*, const String& frameId); | 161 LocalFrame* assertFrame(ErrorString*, const String& frameId); |
162 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } | 162 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } |
163 const AtomicString& resourceSourceMapURL(const String& url); | 163 const AtomicString& resourceSourceMapURL(const String& url); |
164 bool deviceMetricsOverrideEnabled(); | 164 bool deviceMetricsOverrideEnabled(); |
165 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); | 165 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); |
166 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } | 166 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } |
167 void clearEditedResourcesContent(); | 167 void clearEditedResourcesContent(); |
168 void addEditedResourceContent(const String& url, const String& content); | 168 void addEditedResourceContent(const String& url, const String& content); |
169 bool getEditedResourceContent(const String& url, String* content); | 169 bool getEditedResourceContent(const String& url, String* content); |
170 | 170 |
| 171 virtual void trace(Visitor*) OVERRIDE; |
| 172 |
171 private: | 173 private: |
172 class GetResourceContentLoadListener; | 174 class GetResourceContentLoadListener; |
173 | 175 |
174 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 176 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
175 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX,
double offsetY, double fontScaleFactor, bool textAutosizing); | 177 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX,
double offsetY, double fontScaleFactor, bool textAutosizing); |
176 void updateViewMetricsFromState(); | 178 void updateViewMetricsFromState(); |
177 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX, do
uble offsetY, double fontScaleFactor, bool textAutosizingEnabled); | 179 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX, do
uble offsetY, double fontScaleFactor, bool textAutosizingEnabled); |
178 void updateTouchEventEmulationInPage(bool); | 180 void updateTouchEventEmulationInPage(bool); |
179 bool compositingEnabled(ErrorString*); | 181 bool compositingEnabled(ErrorString*); |
180 | 182 |
181 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); | 183 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); |
182 | 184 |
183 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); | 185 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); |
184 | 186 |
185 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); | 187 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); |
186 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); | 188 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); |
187 Page* m_page; | 189 RawPtrWillBeMember<Page> m_page; |
| 190 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
188 InjectedScriptManager* m_injectedScriptManager; | 191 InjectedScriptManager* m_injectedScriptManager; |
189 InspectorClient* m_client; | 192 InspectorClient* m_client; |
190 InspectorFrontend::Page* m_frontend; | 193 InspectorFrontend::Page* m_frontend; |
191 InspectorOverlay* m_overlay; | 194 InspectorOverlay* m_overlay; |
192 long m_lastScriptIdentifier; | 195 long m_lastScriptIdentifier; |
193 String m_pendingScriptToEvaluateOnLoadOnce; | 196 String m_pendingScriptToEvaluateOnLoadOnce; |
194 String m_scriptToEvaluateOnLoadOnce; | 197 String m_scriptToEvaluateOnLoadOnce; |
195 String m_pendingScriptPreprocessor; | 198 String m_pendingScriptPreprocessor; |
196 String m_scriptPreprocessorSource; | 199 String m_scriptPreprocessorSource; |
197 HashMap<LocalFrame*, String> m_frameToIdentifier; | 200 HashMap<LocalFrame*, String> m_frameToIdentifier; |
(...skipping 14 matching lines...) Expand all Loading... |
212 | 215 |
213 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; | 216 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; |
214 HashMap<String, String> m_editedResourceContent; | 217 HashMap<String, String> m_editedResourceContent; |
215 }; | 218 }; |
216 | 219 |
217 | 220 |
218 } // namespace WebCore | 221 } // namespace WebCore |
219 | 222 |
220 | 223 |
221 #endif // !defined(InspectorPagerAgent_h) | 224 #endif // !defined(InspectorPagerAgent_h) |
OLD | NEW |