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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 ImageResource, | 69 ImageResource, |
70 FontResource, | 70 FontResource, |
71 MediaResource, | 71 MediaResource, |
72 ScriptResource, | 72 ScriptResource, |
73 TextTrackResource, | 73 TextTrackResource, |
74 XHRResource, | 74 XHRResource, |
75 WebSocketResource, | 75 WebSocketResource, |
76 OtherResource | 76 OtherResource |
77 }; | 77 }; |
78 | 78 |
79 static PassOwnPtr<InspectorPageAgent> create(Page*, InjectedScriptManager*,
InspectorClient*, InspectorOverlay*); | 79 static PassOwnPtrWillBeRawPtr<InspectorPageAgent> create(Page*, InjectedScri
ptManager*, InspectorClient*, InspectorOverlay*); |
80 | 80 |
81 // Settings overrides. | 81 // Settings overrides. |
82 void setTextAutosizingEnabled(bool); | 82 void setTextAutosizingEnabled(bool); |
83 void setDeviceScaleAdjustment(float); | 83 void setDeviceScaleAdjustment(float); |
84 | 84 |
85 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); | 85 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc
oded); |
86 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); | 86 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text
EncodingName, bool withBase64Encode, String* result); |
87 | 87 |
88 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); | 88 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin
g* textEncodingName); |
89 static Resource* cachedResource(LocalFrame*, const KURL&); | 89 static Resource* cachedResource(LocalFrame*, const KURL&); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 String frameId(LocalFrame*); | 154 String frameId(LocalFrame*); |
155 bool hasIdForFrame(LocalFrame*) const; | 155 bool hasIdForFrame(LocalFrame*) const; |
156 String loaderId(DocumentLoader*); | 156 String loaderId(DocumentLoader*); |
157 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); | 157 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); |
158 LocalFrame* assertFrame(ErrorString*, const String& frameId); | 158 LocalFrame* assertFrame(ErrorString*, const String& frameId); |
159 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } | 159 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } |
160 const AtomicString& resourceSourceMapURL(const String& url); | 160 const AtomicString& resourceSourceMapURL(const String& url); |
161 bool deviceMetricsOverrideEnabled(); | 161 bool deviceMetricsOverrideEnabled(); |
162 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); | 162 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); |
163 | 163 |
| 164 virtual void trace(Visitor*) OVERRIDE; |
| 165 |
164 private: | 166 private: |
165 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); | 167 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String*
result, bool* base64Encoded); |
166 | 168 |
167 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); | 169 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto
rOverlay*); |
168 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); | 170 bool deviceMetricsChanged(bool enabled, int width, int height, double device
ScaleFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool
textAutosizing); |
169 void updateViewMetricsFromState(); | 171 void updateViewMetricsFromState(); |
170 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); | 172 void updateViewMetrics(bool enabled, int width, int height, double deviceSca
leFactor, bool emulateViewport, bool fitWindow, double fontScaleFactor, bool tex
tAutosizingEnabled); |
171 void updateTouchEventEmulationInPage(bool); | 173 void updateTouchEventEmulationInPage(bool); |
172 bool compositingEnabled(ErrorString*); | 174 bool compositingEnabled(ErrorString*); |
173 | 175 |
174 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); | 176 static bool dataContent(const char* data, unsigned size, const String& textE
ncodingName, bool withBase64Encode, String* result); |
175 | 177 |
176 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); | 178 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); |
177 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); | 179 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc
alFrame*); |
178 Page* m_page; | 180 RawPtrWillBeMember<Page> m_page; |
| 181 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
179 InjectedScriptManager* m_injectedScriptManager; | 182 InjectedScriptManager* m_injectedScriptManager; |
180 InspectorClient* m_client; | 183 InspectorClient* m_client; |
181 InspectorFrontend::Page* m_frontend; | 184 InspectorFrontend::Page* m_frontend; |
182 InspectorOverlay* m_overlay; | 185 InspectorOverlay* m_overlay; |
183 long m_lastScriptIdentifier; | 186 long m_lastScriptIdentifier; |
184 String m_pendingScriptToEvaluateOnLoadOnce; | 187 String m_pendingScriptToEvaluateOnLoadOnce; |
185 String m_scriptToEvaluateOnLoadOnce; | 188 String m_scriptToEvaluateOnLoadOnce; |
186 String m_pendingScriptPreprocessor; | 189 String m_pendingScriptPreprocessor; |
187 String m_scriptPreprocessorSource; | 190 String m_scriptPreprocessorSource; |
188 HashMap<LocalFrame*, String> m_frameToIdentifier; | 191 HashMap<LocalFrame*, String> m_frameToIdentifier; |
(...skipping 11 matching lines...) Expand all Loading... |
200 | 203 |
201 bool m_embedderTextAutosizingEnabled; | 204 bool m_embedderTextAutosizingEnabled; |
202 double m_embedderFontScaleFactor; | 205 double m_embedderFontScaleFactor; |
203 }; | 206 }; |
204 | 207 |
205 | 208 |
206 } // namespace WebCore | 209 } // namespace WebCore |
207 | 210 |
208 | 211 |
209 #endif // !defined(InspectorPagerAgent_h) | 212 #endif // !defined(InspectorPagerAgent_h) |
OLD | NEW |