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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 virtual void setTouchEmulationEnabled(ErrorString*, bool) OVERRIDE; | 113 virtual void setTouchEmulationEnabled(ErrorString*, bool) OVERRIDE; |
114 virtual void setEmulatedMedia(ErrorString*, const String&) OVERRIDE; | 114 virtual void setEmulatedMedia(ErrorString*, const String&) OVERRIDE; |
115 virtual void captureScreenshot(ErrorString*, const String* format, const int
* quality, const int* maxWidth, const int* maxHeight, String* data, RefPtr<TypeB
uilder::Page::ScreencastFrameMetadata>& out_metadata) OVERRIDE; | 115 virtual void captureScreenshot(ErrorString*, const String* format, const int
* quality, const int* maxWidth, const int* maxHeight, String* data, RefPtr<TypeB
uilder::Page::ScreencastFrameMetadata>& out_metadata) OVERRIDE; |
116 virtual void canScreencast(ErrorString*, bool*) OVERRIDE; | 116 virtual void canScreencast(ErrorString*, bool*) OVERRIDE; |
117 virtual void startScreencast(ErrorString*, const String* format, const int*
quality, const int* maxWidth, const int* maxHeight) OVERRIDE; | 117 virtual void startScreencast(ErrorString*, const String* format, const int*
quality, const int* maxWidth, const int* maxHeight) OVERRIDE; |
118 virtual void stopScreencast(ErrorString*) OVERRIDE; | 118 virtual void stopScreencast(ErrorString*) OVERRIDE; |
119 virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String*
promptText) OVERRIDE; | 119 virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String*
promptText) OVERRIDE; |
120 virtual void queryUsageAndQuota(WebCore::ErrorString*, const WTF::String&, W
TF::RefPtr<WebCore::TypeBuilder::Page::Quota>&, WTF::RefPtr<WebCore::TypeBuilder
::Page::Usage>&) OVERRIDE; | 120 virtual void queryUsageAndQuota(WebCore::ErrorString*, const WTF::String&, W
TF::RefPtr<WebCore::TypeBuilder::Page::Quota>&, WTF::RefPtr<WebCore::TypeBuilder
::Page::Usage>&) OVERRIDE; |
121 virtual void setShowViewportSizeOnResize(ErrorString*, bool show, const bool
* showGrid) OVERRIDE; | 121 virtual void setShowViewportSizeOnResize(ErrorString*, bool show, const bool
* showGrid) OVERRIDE; |
122 | 122 |
123 // Text autosizing override helpers. | |
124 bool overrideTextAutosizing(bool); | |
125 // Note: This is used by Settings::deviceScaleAdjustment to calculate the ov
erridden device scale adjustment. | |
126 float overrideFontScaleFactor(float); | |
127 | |
128 // InspectorInstrumentation API | 123 // InspectorInstrumentation API |
129 void didClearWindowObjectInMainWorld(Frame*); | 124 void didClearWindowObjectInMainWorld(Frame*); |
130 void domContentLoadedEventFired(Frame*); | 125 void domContentLoadedEventFired(Frame*); |
131 void loadEventFired(Frame*); | 126 void loadEventFired(Frame*); |
132 void didCommitLoad(Frame*, DocumentLoader*); | 127 void didCommitLoad(Frame*, DocumentLoader*); |
133 void frameAttachedToParent(Frame*); | 128 void frameAttachedToParent(Frame*); |
134 void frameDetachedFromParent(Frame*); | 129 void frameDetachedFromParent(Frame*); |
135 void loaderDetachedFromFrame(DocumentLoader*); | 130 void loaderDetachedFromFrame(DocumentLoader*); |
136 void frameStartedLoading(Frame*); | 131 void frameStartedLoading(Frame*); |
137 void frameStoppedLoading(Frame*); | 132 void frameStoppedLoading(Frame*); |
138 void frameScheduledNavigation(Frame*, double delay); | 133 void frameScheduledNavigation(Frame*, double delay); |
139 void frameClearedScheduledNavigation(Frame*); | 134 void frameClearedScheduledNavigation(Frame*); |
140 void willRunJavaScriptDialog(const String& message); | 135 void willRunJavaScriptDialog(const String& message); |
141 void didRunJavaScriptDialog(); | 136 void didRunJavaScriptDialog(); |
142 bool applyViewportStyleOverride(StyleResolver*); | 137 bool applyViewportStyleOverride(StyleResolver*); |
143 void applyEmulatedMedia(String*); | 138 void applyEmulatedMedia(String*); |
144 void didPaint(RenderObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); | 139 void didPaint(RenderObject*, const GraphicsLayer*, GraphicsContext*, const L
ayoutRect&); |
145 void didLayout(RenderObject*); | 140 void didLayout(RenderObject*); |
146 void didScroll(); | 141 void didScroll(); |
147 void didResizeMainFrame(); | 142 void didResizeMainFrame(); |
148 void didRecalculateStyle(); | 143 void didRecalculateStyle(); |
149 void scriptsEnabled(bool isEnabled); | 144 void settingsChanged(); |
150 | 145 |
151 // Inspector Controller API | 146 // Inspector Controller API |
152 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 147 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
153 virtual void clearFrontend() OVERRIDE; | 148 virtual void clearFrontend() OVERRIDE; |
154 virtual void restore() OVERRIDE; | 149 virtual void restore() OVERRIDE; |
155 | 150 |
156 void webViewResized(const IntSize&); | 151 void webViewResized(const IntSize&); |
157 | 152 |
158 // Cross-agents API | 153 // Cross-agents API |
159 Page* page() { return m_page; } | 154 Page* page() { return m_page; } |
(...skipping 12 matching lines...) Expand all Loading... |
172 | 167 |
173 private: | 168 private: |
174 static void resourceContent(ErrorString*, Frame*, const KURL&, String* resul
t, bool* base64Encoded); | 169 static void resourceContent(ErrorString*, Frame*, const KURL&, String* resul
t, bool* base64Encoded); |
175 | 170 |
176 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 171 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
177 bool deviceMetricsChanged(int width, int height, double deviceScaleFactor, b
ool emulateViewport, bool fitWindow, double fontScaleFactor, bool textAutosizing
); | 172 bool deviceMetricsChanged(int width, int height, double deviceScaleFactor, b
ool emulateViewport, bool fitWindow, double fontScaleFactor, bool textAutosizing
); |
178 void updateViewMetrics(int width, int height, double deviceScaleFactor, bool
emulateViewport, bool fitWindow); | 173 void updateViewMetrics(int width, int height, double deviceScaleFactor, bool
emulateViewport, bool fitWindow); |
179 void updateTouchEventEmulationInPage(bool); | 174 void updateTouchEventEmulationInPage(bool); |
180 bool forceCompositingMode(ErrorString*); | 175 bool forceCompositingMode(ErrorString*); |
181 | 176 |
| 177 // Text autosizing override helpers. |
| 178 bool overrideTextAutosizing(); |
| 179 // Note: This is used by Settings::deviceScaleAdjustment to calculate the ov
erridden device scale adjustment. |
| 180 float overrideFontScaleFactor(); |
| 181 |
182 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); | 182 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); |
183 | 183 |
184 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*); | 184 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*); |
185 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Fra
me*); | 185 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Fra
me*); |
186 Page* m_page; | 186 Page* m_page; |
187 InjectedScriptManager* m_injectedScriptManager; | 187 InjectedScriptManager* m_injectedScriptManager; |
188 InspectorClient* m_client; | 188 InspectorClient* m_client; |
189 InspectorFrontend::Page* m_frontend; | 189 InspectorFrontend::Page* m_frontend; |
190 InspectorOverlay* m_overlay; | 190 InspectorOverlay* m_overlay; |
191 long m_lastScriptIdentifier; | 191 long m_lastScriptIdentifier; |
192 String m_pendingScriptToEvaluateOnLoadOnce; | 192 String m_pendingScriptToEvaluateOnLoadOnce; |
193 String m_scriptToEvaluateOnLoadOnce; | 193 String m_scriptToEvaluateOnLoadOnce; |
194 String m_pendingScriptPreprocessor; | 194 String m_pendingScriptPreprocessor; |
195 String m_scriptPreprocessorSource; | 195 String m_scriptPreprocessorSource; |
196 HashMap<Frame*, String> m_frameToIdentifier; | 196 HashMap<Frame*, String> m_frameToIdentifier; |
197 HashMap<String, Frame*> m_identifierToFrame; | 197 HashMap<String, Frame*> m_identifierToFrame; |
198 HashMap<DocumentLoader*, String> m_loaderToIdentifier; | 198 HashMap<DocumentLoader*, String> m_loaderToIdentifier; |
199 bool m_enabled; | 199 bool m_enabled; |
200 bool m_ignoreScriptsEnabledNotification; | 200 bool m_ignoreScriptsEnabledNotification; |
201 bool m_deviceMetricsOverridden; | 201 bool m_deviceMetricsOverridden; |
202 bool m_emulateViewportEnabled; | 202 bool m_emulateViewportEnabled; |
| 203 bool m_settingsCacheTextAutosizingEnabled; |
| 204 float m_settingsCacheFontScaleFactor; |
203 }; | 205 }; |
204 | 206 |
205 | 207 |
206 } // namespace WebCore | 208 } // namespace WebCore |
207 | 209 |
208 | 210 |
209 #endif // !defined(InspectorPagerAgent_h) | 211 #endif // !defined(InspectorPagerAgent_h) |
OLD | NEW |