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

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

Issue 351303003: [DevTools] Switch from DIP to CSS pixels in device mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments Created 6 years, 5 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 String createIdentifier(); 155 String createIdentifier();
156 LocalFrame* frameForId(const String& frameId); 156 LocalFrame* frameForId(const String& frameId);
157 String frameId(LocalFrame*); 157 String frameId(LocalFrame*);
158 bool hasIdForFrame(LocalFrame*) const; 158 bool hasIdForFrame(LocalFrame*) const;
159 String loaderId(DocumentLoader*); 159 String loaderId(DocumentLoader*);
160 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); 160 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString);
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 void deviceOrPageScaleFactorChanged();
165 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); 166 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*);
166 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector ResourceContentLoader.get(); } 167 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector ResourceContentLoader.get(); }
167 void clearEditedResourcesContent(); 168 void clearEditedResourcesContent();
168 void addEditedResourceContent(const String& url, const String& content); 169 void addEditedResourceContent(const String& url, const String& content);
169 bool getEditedResourceContent(const String& url, String* content); 170 bool getEditedResourceContent(const String& url, String* content);
170 171
171 private: 172 private:
172 class GetResourceContentLoadListener; 173 class GetResourceContentLoadListener;
173 174
174 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto rOverlay*); 175 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); 176 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(); 177 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); 178 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); 179 void updateTouchEventEmulationInPage(bool);
179 bool compositingEnabled(ErrorString*); 180 bool compositingEnabled(ErrorString*);
180 181
181 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co nst String& url, PassRefPtr<GetResourceContentCallback>); 182 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co nst String& url, PassRefPtr<GetResourceContentCallback>);
182 183
183 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result); 184 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result);
184 185
186 void viewportChanged();
187
185 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); 188 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*);
186 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc alFrame*); 189 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc alFrame*);
187 Page* m_page; 190 Page* m_page;
188 InjectedScriptManager* m_injectedScriptManager; 191 InjectedScriptManager* m_injectedScriptManager;
189 InspectorClient* m_client; 192 InspectorClient* m_client;
190 InspectorFrontend::Page* m_frontend; 193 InspectorFrontend::Page* m_frontend;
191 InspectorOverlay* m_overlay; 194 InspectorOverlay* m_overlay;
192 long m_lastScriptIdentifier; 195 long m_lastScriptIdentifier;
193 String m_pendingScriptToEvaluateOnLoadOnce; 196 String m_pendingScriptToEvaluateOnLoadOnce;
194 String m_scriptToEvaluateOnLoadOnce; 197 String m_scriptToEvaluateOnLoadOnce;
(...skipping 17 matching lines...) Expand all
212 215
213 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader; 216 OwnPtr<InspectorResourceContentLoader> m_inspectorResourceContentLoader;
214 HashMap<String, String> m_editedResourceContent; 217 HashMap<String, String> m_editedResourceContent;
215 }; 218 };
216 219
217 220
218 } // namespace WebCore 221 } // namespace WebCore
219 222
220 223
221 #endif // !defined(InspectorPagerAgent_h) 224 #endif // !defined(InspectorPagerAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorController.cpp ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698