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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 ImageResource, | 69 ImageResource, |
70 FontResource, | 70 FontResource, |
71 MediaResource, | 71 MediaResource, |
72 ScriptResource, | 72 ScriptResource, |
73 TextTrackResource, | 73 TextTrackResource, |
74 XHRResource, | 74 XHRResource, |
75 WebSocketResource, | 75 WebSocketResource, |
76 OtherResource | 76 OtherResource |
77 }; | 77 }; |
78 | 78 |
79 static PassOwnPtr<InspectorPageAgent> create(Page*, InjectedScriptManager*,
InspectorClient*, InspectorOverlay*); | 79 static PassOwnPtrWillBeRawPtr<InspectorPageAgent> create(Page*, InjectedScri
ptManager*, InspectorClient*, InspectorOverlay*); |
80 | 80 |
81 // Settings overrides. | 81 // Settings overrides. |
82 void setTextAutosizingEnabled(bool); | 82 void setTextAutosizingEnabled(bool); |
83 void setDeviceScaleAdjustment(float); | 83 void setDeviceScaleAdjustment(float); |
84 | 84 |
85 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); | 85 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); |
86 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); | 86 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); |
87 | 87 |
88 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); | 88 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); |
89 static Resource* cachedResource(LocalFrame*, const KURL&); | 89 static Resource* cachedResource(LocalFrame*, const KURL&); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 String frameId(LocalFrame*); | 156 String frameId(LocalFrame*); |
157 bool hasIdForFrame(LocalFrame*) const; | 157 bool hasIdForFrame(LocalFrame*) const; |
158 String loaderId(DocumentLoader*); | 158 String loaderId(DocumentLoader*); |
159 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); | 159 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); |
160 LocalFrame* assertFrame(ErrorString*, const String& frameId); | 160 LocalFrame* assertFrame(ErrorString*, const String& frameId); |
161 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } | 161 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } |
162 const AtomicString& resourceSourceMapURL(const String& url); | 162 const AtomicString& resourceSourceMapURL(const String& url); |
163 bool deviceMetricsOverrideEnabled(); | 163 bool deviceMetricsOverrideEnabled(); |
164 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); | 164 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); |
165 | 165 |
| 166 virtual void trace(Visitor*) OVERRIDE; |
| 167 |
166 private: | 168 private: |
167 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); | 169 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); |
168 | 170 |
169 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 171 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
170 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); | 172 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); |
171 void updateViewMetricsFromState(); | 173 void updateViewMetricsFromState(); |
172 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); | 174 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); |
173 void updateTouchEventEmulationInPage(bool); | 175 void updateTouchEventEmulationInPage(bool); |
174 bool forceCompositingMode(ErrorString*); | 176 bool forceCompositingMode(ErrorString*); |
175 | 177 |
176 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); | 178 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); |
177 | 179 |
178 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); | 180 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); |
179 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); | 181 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); |
180 Page* m_page; | 182 RawPtrWillBeMember<Page> m_page; |
181 InjectedScriptManager* m_injectedScriptManager; | 183 InjectedScriptManager* m_injectedScriptManager; |
182 InspectorClient* m_client; | 184 InspectorClient* m_client; |
183 InspectorFrontend::Page* m_frontend; | 185 InspectorFrontend::Page* m_frontend; |
184 InspectorOverlay* m_overlay; | 186 InspectorOverlay* m_overlay; |
185 long m_lastScriptIdentifier; | 187 long m_lastScriptIdentifier; |
186 String m_pendingScriptToEvaluateOnLoadOnce; | 188 String m_pendingScriptToEvaluateOnLoadOnce; |
187 String m_scriptToEvaluateOnLoadOnce; | 189 String m_scriptToEvaluateOnLoadOnce; |
188 String m_pendingScriptPreprocessor; | 190 String m_pendingScriptPreprocessor; |
189 String m_scriptPreprocessorSource; | 191 String m_scriptPreprocessorSource; |
190 HashMap<LocalFrame*, String> m_frameToIdentifier; | 192 HashMap<LocalFrame*, String> m_frameToIdentifier; |
(...skipping 11 matching lines...) Expand all Loading... |
202 | 204 |
203 bool m_embedderTextAutosizingEnabled; | 205 bool m_embedderTextAutosizingEnabled; |
204 double m_embedderFontScaleFactor; | 206 double m_embedderFontScaleFactor; |
205 }; | 207 }; |
206 | 208 |
207 | 209 |
208 } // namespace WebCore | 210 } // namespace WebCore |
209 | 211 |
210 | 212 |
211 #endif // !defined(InspectorPagerAgent_h) | 213 #endif // !defined(InspectorPagerAgent_h) |
OLD | NEW |