| 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 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); | 174 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); |
| 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 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 14 matching lines...) Expand all Loading... |
| 210 | 213 |
| 211 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; | 214 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; |
| 212 HashMap<String, String> m_editedResourceContent; | 215 HashMap<String, String> m_editedResourceContent; |
| 213 }; | 216 }; |
| 214 | 217 |
| 215 | 218 |
| 216 } // namespace WebCore | 219 } // namespace WebCore |
| 217 | 220 |
| 218 | 221 |
| 219 #endif // !defined(InspectorPagerAgent_h) | 222 #endif // !defined(InspectorPagerAgent_h) |
| OLD | NEW |