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

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

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 WebSocketResource, 75 WebSocketResource,
76 OtherResource 76 OtherResource
77 }; 77 };
78 78
79 static PassOwnPtr<InspectorPageAgent> create(Page*, InjectedScriptManager*, InspectorClient*, InspectorOverlay*); 79 static PassOwnPtr<InspectorPageAgent> create(Page*, InjectedScriptManager*, 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 Vector<Document*> importsForFrame(LocalFrame*);
85 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc oded); 86 static bool cachedResourceContent(Resource*, String* result, bool* base64Enc oded);
86 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text EncodingName, bool withBase64Encode, String* result); 87 static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& text EncodingName, bool withBase64Encode, String* result);
88 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String* result, bool* base64Encoded);
87 89
88 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin g* textEncodingName); 90 static PassRefPtr<SharedBuffer> resourceData(LocalFrame*, const KURL&, Strin g* textEncodingName);
89 static Resource* cachedResource(LocalFrame*, const KURL&); 91 static Resource* cachedResource(LocalFrame*, const KURL&);
90 static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType); 92 static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType);
91 static ResourceType cachedResourceType(const Resource&); 93 static ResourceType cachedResourceType(const Resource&);
92 static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const Re source&); 94 static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const Re source&);
93 95
94 // Page API for InspectorFrontend 96 // Page API for InspectorFrontend
95 virtual void enable(ErrorString*) OVERRIDE; 97 virtual void enable(ErrorString*) OVERRIDE;
96 virtual void disable(ErrorString*) OVERRIDE; 98 virtual void disable(ErrorString*) OVERRIDE;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 bool hasIdForFrame(LocalFrame*) const; 159 bool hasIdForFrame(LocalFrame*) const;
158 String loaderId(DocumentLoader*); 160 String loaderId(DocumentLoader*);
159 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); 161 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString);
160 LocalFrame* assertFrame(ErrorString*, const String& frameId); 162 LocalFrame* assertFrame(ErrorString*, const String& frameId);
161 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; } 163 String scriptPreprocessorSource() { return m_scriptPreprocessorSource; }
162 const AtomicString& resourceSourceMapURL(const String& url); 164 const AtomicString& resourceSourceMapURL(const String& url);
163 bool deviceMetricsOverrideEnabled(); 165 bool deviceMetricsOverrideEnabled();
164 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*); 166 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*);
165 167
166 private: 168 private:
167 static void resourceContent(ErrorString*, LocalFrame*, const KURL&, String* result, bool* base64Encoded);
168
169 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto rOverlay*); 169 InspectorPageAgent(Page*, InjectedScriptManager*, InspectorClient*, Inspecto rOverlay*);
170 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);
171 void updateViewMetricsFromState(); 171 void updateViewMetricsFromState();
172 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);
173 void updateTouchEventEmulationInPage(bool); 173 void updateTouchEventEmulationInPage(bool);
174 bool forceCompositingMode(ErrorString*); 174 bool forceCompositingMode(ErrorString*);
175 175
176 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);
177 177
178 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); 178 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*);
(...skipping 23 matching lines...) Expand all
202 202
203 bool m_embedderTextAutosizingEnabled; 203 bool m_embedderTextAutosizingEnabled;
204 double m_embedderFontScaleFactor; 204 double m_embedderFontScaleFactor;
205 }; 205 };
206 206
207 207
208 } // namespace WebCore 208 } // namespace WebCore
209 209
210 210
211 #endif // !defined(InspectorPagerAgent_h) 211 #endif // !defined(InspectorPagerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698