| 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 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); | 90 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); |
| 91 | 91 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 bool hasIdForFrame(LocalFrame*) const; | 159 bool hasIdForFrame(LocalFrame*) const; |
| 160 String loaderId(DocumentLoader*); | 160 String loaderId(DocumentLoader*); |
| 161 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); | 161 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); |
| 162 LocalFrame* assertFrame(ErrorString*, const String& frameId); | 162 LocalFrame* assertFrame(ErrorString*, const String& frameId); |
| 163 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } | 163 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } |
| 164 const AtomicString& resourceSourceMapURL(const String& url); | 164 const AtomicString& resourceSourceMapURL(const String& url); |
| 165 bool deviceMetricsOverrideEnabled(); | 165 bool deviceMetricsOverrideEnabled(); |
| 166 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); | 166 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); |
| 167 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } | 167 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } |
| 168 | 168 |
| 169 virtual void trace(Visitor*) OVERRIDE; |
| 170 |
| 169 private: | 171 private: |
| 170 class GetResourceContentLoadListener; | 172 class GetResourceContentLoadListener; |
| 171 | 173 |
| 172 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 174 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
| 173 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); | 175 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); |
| 174 void updateViewMetricsFromState(); | 176 void updateViewMetricsFromState(); |
| 175 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); | 177 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); |
| 176 void updateTouchEventEmulationInPage(bool); | 178 void updateTouchEventEmulationInPage(bool); |
| 177 bool compositingEnabled(ErrorString*); | 179 bool compositingEnabled(ErrorString*); |
| 178 | 180 |
| 179 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); | 181 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); |
| 180 | 182 |
| 181 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); | 183 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); |
| 182 | 184 |
| 183 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); | 185 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); |
| 184 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); | 186 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); |
| 185 Page* m_page; | 187 RawPtrWillBeMember<Page> m_page; |
| 188 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
| 186 InjectedScriptManager* m_injectedScriptManager; | 189 InjectedScriptManager* m_injectedScriptManager; |
| 187 InspectorClient* m_client; | 190 InspectorClient* m_client; |
| 188 InspectorFrontend::Page* m_frontend; | 191 InspectorFrontend::Page* m_frontend; |
| 189 InspectorOverlay* m_overlay; | 192 InspectorOverlay* m_overlay; |
| 190 long m_lastScriptIdentifier; | 193 long m_lastScriptIdentifier; |
| 191 String m_pendingScriptToEvaluateOnLoadOnce; | 194 String m_pendingScriptToEvaluateOnLoadOnce; |
| 192 String m_scriptToEvaluateOnLoadOnce; | 195 String m_scriptToEvaluateOnLoadOnce; |
| 193 String m_pendingScriptPreprocessor; | 196 String m_pendingScriptPreprocessor; |
| 194 String m_scriptPreprocessorSource; | 197 String m_scriptPreprocessorSource; |
| 195 HashMap<LocalFrame*, String> m_frameToIdentifier; | 198 HashMap<LocalFrame*, String> m_frameToIdentifier; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 209 double m_embedderFontScaleFactor; | 212 double m_embedderFontScaleFactor; |
| 210 | 213 |
| 211 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; | 214 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; |
| 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 |