Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: Source/core/inspector/InspectorPageAgent.h

Issue 26929003: Add text autosizing override in the inspector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add optional flag in protocol.json Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void navigate(ErrorString*, const String& url); 94 virtual void navigate(ErrorString*, const String& url);
95 virtual void getNavigationHistory(ErrorString*, int*, RefPtr<TypeBuilder::Ar ray<TypeBuilder::Page::NavigationEntry> >&); 95 virtual void getNavigationHistory(ErrorString*, int*, RefPtr<TypeBuilder::Ar ray<TypeBuilder::Page::NavigationEntry> >&);
96 virtual void navigateToHistoryEntry(ErrorString*, int); 96 virtual void navigateToHistoryEntry(ErrorString*, int);
97 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder: :Page::Cookie> >& cookies, WTF::String* cookiesString); 97 virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder: :Page::Cookie> >& cookies, WTF::String* cookiesString);
98 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri ng& url); 98 virtual void deleteCookie(ErrorString*, const String& cookieName, const Stri ng& url);
99 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe sourceTree>&); 99 virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameRe sourceTree>&);
100 virtual void getResourceContent(ErrorString*, const String& frameId, const S tring& url, String* content, bool* base64Encoded); 100 virtual void getResourceContent(ErrorString*, const String& frameId, const S tring& url, String* content, bool* base64Encoded);
101 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> >&); 101 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> >&);
102 virtual void searchInResources(ErrorString*, const String&, const bool* case Sensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Sea rchResult> >&); 102 virtual void searchInResources(ErrorString*, const String&, const bool* case Sensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Sea rchResult> >&);
103 virtual void setDocumentContent(ErrorString*, const String& frameId, const S tring& html); 103 virtual void setDocumentContent(ErrorString*, const String& frameId, const S tring& html);
104 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d ouble deviceScaleFactor, bool fitWindow); 104 virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, d ouble deviceScaleFactor, bool fitWindow, const bool* optionalTextAutosizing);
105 virtual void setShowPaintRects(ErrorString*, bool show); 105 virtual void setShowPaintRects(ErrorString*, bool show);
106 virtual void setShowDebugBorders(ErrorString*, bool show); 106 virtual void setShowDebugBorders(ErrorString*, bool show);
107 virtual void setShowFPSCounter(ErrorString*, bool show); 107 virtual void setShowFPSCounter(ErrorString*, bool show);
108 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled); 108 virtual void setContinuousPaintingEnabled(ErrorString*, bool enabled);
109 virtual void setShowScrollBottleneckRects(ErrorString*, bool show); 109 virtual void setShowScrollBottleneckRects(ErrorString*, bool show);
110 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu lt::Enum*); 110 virtual void getScriptExecutionStatus(ErrorString*, PageCommandHandler::Resu lt::Enum*);
111 virtual void setScriptExecutionDisabled(ErrorString*, bool); 111 virtual void setScriptExecutionDisabled(ErrorString*, bool);
112 virtual void setGeolocationOverride(ErrorString*, const double*, const doubl e*, const double*); 112 virtual void setGeolocationOverride(ErrorString*, const double*, const doubl e*, const double*);
113 virtual void clearGeolocationOverride(ErrorString*); 113 virtual void clearGeolocationOverride(ErrorString*);
114 virtual void setDeviceOrientationOverride(ErrorString*, double, double, doub le); 114 virtual void setDeviceOrientationOverride(ErrorString*, double, double, doub le);
115 virtual void clearDeviceOrientationOverride(ErrorString*); 115 virtual void clearDeviceOrientationOverride(ErrorString*);
116 virtual void setTouchEmulationEnabled(ErrorString*, bool); 116 virtual void setTouchEmulationEnabled(ErrorString*, bool);
117 virtual void setEmulatedMedia(ErrorString*, const String&); 117 virtual void setEmulatedMedia(ErrorString*, const String&);
118 virtual void setForceCompositingMode(ErrorString*, bool force); 118 virtual void setForceCompositingMode(ErrorString*, bool force);
119 virtual void captureScreenshot(ErrorString*, const String* format, const int * quality, const int* maxWidth, const int* maxHeight, String* data, double* devi ceScaleFactor, double* pageScaleFactor, RefPtr<TypeBuilder::DOM::Rect>&); 119 virtual void captureScreenshot(ErrorString*, const String* format, const int * quality, const int* maxWidth, const int* maxHeight, String* data, double* devi ceScaleFactor, double* pageScaleFactor, RefPtr<TypeBuilder::DOM::Rect>&);
120 virtual void startScreencast(ErrorString*, const String* format, const int* quality, const int* maxWidth, const int* maxHeight); 120 virtual void startScreencast(ErrorString*, const String* format, const int* quality, const int* maxWidth, const int* maxHeight);
121 virtual void stopScreencast(ErrorString*); 121 virtual void stopScreencast(ErrorString*);
122 virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String* promptText); 122 virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String* promptText);
123 virtual void setShowViewportSizeOnResize(ErrorString*, bool show, const bool * showGrid); 123 virtual void setShowViewportSizeOnResize(ErrorString*, bool show, const bool * showGrid);
124 124
125 // Geolocation override helpers. 125 // Geolocation override helper.
126 GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*); 126 GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);
127 127
128 // DeviceOrientation helper 128 // DeviceOrientation helper.
129 DeviceOrientationData* overrideDeviceOrientation(DeviceOrientationData*); 129 DeviceOrientationData* overrideDeviceOrientation(DeviceOrientationData*);
130 130
131 // Text autosizing helper.
132 bool overrideTextAutosizing(bool);
133
131 // InspectorInstrumentation API 134 // InspectorInstrumentation API
132 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*); 135 void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
133 void domContentLoadedEventFired(Frame*); 136 void domContentLoadedEventFired(Frame*);
134 void loadEventFired(Frame*); 137 void loadEventFired(Frame*);
135 void childDocumentOpened(Document*); 138 void childDocumentOpened(Document*);
136 void didCommitLoad(Frame*, DocumentLoader*); 139 void didCommitLoad(Frame*, DocumentLoader*);
137 void frameAttachedToParent(Frame*); 140 void frameAttachedToParent(Frame*);
138 void frameDetachedFromParent(Frame*); 141 void frameDetachedFromParent(Frame*);
139 void loaderDetachedFromFrame(DocumentLoader*); 142 void loaderDetachedFromFrame(DocumentLoader*);
140 void frameStartedLoading(Frame*); 143 void frameStartedLoading(Frame*);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 Frame* findFrameWithSecurityOrigin(const String& originRawString); 176 Frame* findFrameWithSecurityOrigin(const String& originRawString);
174 Frame* assertFrame(ErrorString*, const String& frameId); 177 Frame* assertFrame(ErrorString*, const String& frameId);
175 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } 178 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; }
176 String resourceSourceMapURL(const String& url); 179 String resourceSourceMapURL(const String& url);
177 static DocumentLoader* assertDocumentLoader(ErrorString*, Frame*); 180 static DocumentLoader* assertDocumentLoader(ErrorString*, Frame*);
178 181
179 private: 182 private:
180 static void resourceContent(ErrorString*, Frame*, const KURL&, String* resul t, bool* base64Encoded); 183 static void resourceContent(ErrorString*, Frame*, const KURL&, String* resul t, bool* base64Encoded);
181 184
182 InspectorPageAgent(InstrumentingAgents*, Page*, InspectorCompositeState*, In jectedScriptManager*, InspectorClient*, InspectorOverlay*); 185 InspectorPageAgent(InstrumentingAgents*, Page*, InspectorCompositeState*, In jectedScriptManager*, InspectorClient*, InspectorOverlay*);
183 bool deviceMetricsChanged(int width, int height, double fontScaleFactor, boo l fitWindow); 186 bool deviceMetricsChanged(int width, int height, double fontScaleFactor, boo l fitWindow, bool textAutosizing);
184 void updateViewMetrics(int, int, double, bool); 187 void updateViewMetrics(int width, int height, double deviceScaleFactor, bool fitWindow, bool textAutosizing);
185 void updateTouchEventEmulationInPage(bool); 188 void updateTouchEventEmulationInPage(bool);
186 void updateOverridesTopOffset(); 189 void updateOverridesTopOffset();
187 190
188 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result); 191 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result);
189 192
190 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*); 193 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*);
191 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Fra me*); 194 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Fra me*);
192 Page* m_page; 195 Page* m_page;
193 InjectedScriptManager* m_injectedScriptManager; 196 InjectedScriptManager* m_injectedScriptManager;
194 InspectorClient* m_client; 197 InspectorClient* m_client;
(...skipping 14 matching lines...) Expand all
209 RefPtr<GeolocationPosition> m_geolocationPosition; 212 RefPtr<GeolocationPosition> m_geolocationPosition;
210 RefPtr<GeolocationPosition> m_platformGeolocationPosition; 213 RefPtr<GeolocationPosition> m_platformGeolocationPosition;
211 RefPtr<DeviceOrientationData> m_deviceOrientation; 214 RefPtr<DeviceOrientationData> m_deviceOrientation;
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)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.idl ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698