| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identi
fier) OVERRIDE; | 101 virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identi
fier) OVERRIDE; |
| 102 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const Str
ing* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor) O
VERRIDE; | 102 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const Str
ing* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor) O
VERRIDE; |
| 103 virtual void navigate(ErrorString*, const String& url, String* frameId) OVER
RIDE; | 103 virtual void navigate(ErrorString*, const String& url, String* frameId) OVER
RIDE; |
| 104 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder:
:Page::Cookie> >& cookies) OVERRIDE; | 104 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder:
:Page::Cookie> >& cookies) OVERRIDE; |
| 105 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri
ng& url) OVERRIDE; | 105 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri
ng& url) OVERRIDE; |
| 106 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe
sourceTree>&) OVERRIDE; | 106 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe
sourceTree>&) OVERRIDE; |
| 107 virtual void getResourceContent(ErrorString*, const String& frameId, const S
tring& url, PassRefPtr<GetResourceContentCallback>) OVERRIDE; | 107 virtual void getResourceContent(ErrorString*, const String& frameId, const S
tring& url, PassRefPtr<GetResourceContentCallback>) OVERRIDE; |
| 108 virtual void hasTouchInputs(ErrorString*, bool* result) OVERRIDE; | 108 virtual void hasTouchInputs(ErrorString*, bool* result) OVERRIDE; |
| 109 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> >&) OVE
RRIDE; | 109 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> >&) OVE
RRIDE; |
| 110 virtual void setDocumentContent(ErrorString*, const String& frameId, const S
tring& html) OVERRIDE; | 110 virtual void setDocumentContent(ErrorString*, const String& frameId, const S
tring& html) OVERRIDE; |
| 111 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d
ouble deviceScaleFactor, bool emulateViewport, bool fitWindow, const double* opt
ionalScale, const double* optionalOffsetX, const double* optionalOffsetY) OVERRI
DE; | 111 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d
ouble deviceScaleFactor, bool mobile, bool fitWindow, const double* optionalScal
e, const double* optionalOffsetX, const double* optionalOffsetY) OVERRIDE; |
| 112 virtual void clearDeviceMetricsOverride(ErrorString*) OVERRIDE; | 112 virtual void clearDeviceMetricsOverride(ErrorString*) OVERRIDE; |
| 113 virtual void resetScrollAndPageScaleFactor(ErrorString*) OVERRIDE; | 113 virtual void resetScrollAndPageScaleFactor(ErrorString*) OVERRIDE; |
| 114 virtual void setShowPaintRects(ErrorString*, bool show) OVERRIDE; | 114 virtual void setShowPaintRects(ErrorString*, bool show) OVERRIDE; |
| 115 virtual void setShowDebugBorders(ErrorString*, bool show) OVERRIDE; | 115 virtual void setShowDebugBorders(ErrorString*, bool show) OVERRIDE; |
| 116 virtual void setShowFPSCounter(ErrorString*, bool show) OVERRIDE; | 116 virtual void setShowFPSCounter(ErrorString*, bool show) OVERRIDE; |
| 117 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled) OVERRI
DE; | 117 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled) OVERRI
DE; |
| 118 virtual void setShowScrollBottleneckRects(ErrorString*, bool show) OVERRIDE; | 118 virtual void setShowScrollBottleneckRects(ErrorString*, bool show) OVERRIDE; |
| 119 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu
lt::Enum*) OVERRIDE; | 119 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu
lt::Enum*) OVERRIDE; |
| 120 virtual void setScriptExecutionDisabled(ErrorString*, bool) OVERRIDE; | 120 virtual void setScriptExecutionDisabled(ErrorString*, bool) OVERRIDE; |
| 121 virtual void setTouchEmulationEnabled(ErrorString*, bool) OVERRIDE; | 121 virtual void setTouchEmulationEnabled(ErrorString*, bool) OVERRIDE; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); | 167 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); |
| 168 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } | 168 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector
ResourceContentLoader.get(); } |
| 169 void clearEditedResourcesContent(); | 169 void clearEditedResourcesContent(); |
| 170 void addEditedResourceContent(const String& url, const String& content); | 170 void addEditedResourceContent(const String& url, const String& content); |
| 171 bool getEditedResourceContent(const String& url, String* content); | 171 bool getEditedResourceContent(const String& url, String* content); |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 class GetResourceContentLoadListener; | 174 class GetResourceContentLoadListener; |
| 175 | 175 |
| 176 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 176 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
| 177 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX,
double offsetY); | 177 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool mobile, bool fitWindow, double scale, double offsetX, double o
ffsetY); |
| 178 void updateViewMetricsFromState(); | 178 void updateViewMetricsFromState(); |
| 179 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double scale, double offsetX, do
uble offsetY); | 179 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool mobile, bool fitWindow, double scale, double offsetX, double offs
etY); |
| 180 void updateTouchEventEmulationInPage(bool); | 180 void updateTouchEventEmulationInPage(bool); |
| 181 bool compositingEnabled(ErrorString*); | 181 bool compositingEnabled(ErrorString*); |
| 182 | 182 |
| 183 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); | 183 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co
nst String& url, PassRefPtr<GetResourceContentCallback>); |
| 184 | 184 |
| 185 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); |
| 186 | 186 |
| 187 void viewportChanged(); | 187 void viewportChanged(); |
| 188 | 188 |
| 189 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); | 189 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); |
| 190 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); | 190 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); |
| 191 Page* m_page; | 191 Page* m_page; |
| 192 InjectedScriptManager* m_injectedScriptManager; | 192 InjectedScriptManager* m_injectedScriptManager; |
| 193 InspectorClient* m_client; | 193 InspectorClient* m_client; |
| 194 InspectorFrontend::Page* m_frontend; | 194 InspectorFrontend::Page* m_frontend; |
| 195 InspectorOverlay* m_overlay; | 195 InspectorOverlay* m_overlay; |
| 196 long m_lastScriptIdentifier; | 196 long m_lastScriptIdentifier; |
| 197 String m_pendingScriptToEvaluateOnLoadOnce; | 197 String m_pendingScriptToEvaluateOnLoadOnce; |
| 198 String m_scriptToEvaluateOnLoadOnce; | 198 String m_scriptToEvaluateOnLoadOnce; |
| 199 String m_pendingScriptPreprocessor; | 199 String m_pendingScriptPreprocessor; |
| 200 String m_scriptPreprocessorSource; | 200 String m_scriptPreprocessorSource; |
| 201 HashMap<LocalFrame*, String> m_frameToIdentifier; | 201 HashMap<LocalFrame*, String> m_frameToIdentifier; |
| 202 HashMap<String, LocalFrame*> m_identifierToFrame; | 202 HashMap<String, LocalFrame*> m_identifierToFrame; |
| 203 HashMap<DocumentLoader*, String> m_loaderToIdentifier; | 203 HashMap<DocumentLoader*, String> m_loaderToIdentifier; |
| 204 bool m_enabled; | 204 bool m_enabled; |
| 205 bool m_ignoreScriptsEnabledNotification; | 205 bool m_ignoreScriptsEnabledNotification; |
| 206 bool m_deviceMetricsOverridden; | 206 bool m_deviceMetricsOverridden; |
| 207 bool m_emulateViewportEnabled; | 207 bool m_emulateMobileEnabled; |
| 208 | 208 |
| 209 bool m_touchEmulationEnabled; | 209 bool m_touchEmulationEnabled; |
| 210 bool m_originalTouchEnabled; | 210 bool m_originalTouchEnabled; |
| 211 bool m_originalDeviceSupportsMouse; | 211 bool m_originalDeviceSupportsMouse; |
| 212 bool m_originalDeviceSupportsTouch; | 212 bool m_originalDeviceSupportsTouch; |
| 213 | 213 |
| 214 bool m_embedderTextAutosizingEnabled; | 214 bool m_embedderTextAutosizingEnabled; |
| 215 double m_embedderFontScaleFactor; | 215 double m_embedderFontScaleFactor; |
| 216 | 216 |
| 217 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; | 217 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; |
| 218 HashMap<String, String> m_editedResourceContent; | 218 HashMap<String, String> m_editedResourceContent; |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 | 221 |
| 222 } // namespace WebCore | 222 } // namespace WebCore |
| 223 | 223 |
| 224 | 224 |
| 225 #endif // !defined(InspectorPagerAgent_h) | 225 #endif // !defined(InspectorPagerAgent_h) |
| OLD | NEW |