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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) | 239 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) |
240 { | 240 { |
241 if (withBase64Encode) { | 241 if (withBase64Encode) { |
242 *result = base64Encode(data, size); | 242 *result = base64Encode(data, size); |
243 return true; | 243 return true; |
244 } | 244 } |
245 | 245 |
246 return decodeBuffer(data, size, textEncodingName, result); | 246 return decodeBuffer(data, size, textEncodingName, result); |
247 } | 247 } |
248 | 248 |
249 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page, InjectedSc
riptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* o
verlay) | 249 PassOwnPtrWillBeRawPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page
, InjectedScriptManager* injectedScriptManager, InspectorClient* client, Inspect
orOverlay* overlay) |
250 { | 250 { |
251 return adoptPtr(new InspectorPageAgent(page, injectedScriptManager, client,
overlay)); | 251 return adoptPtrWillBeNoop(new InspectorPageAgent(page, injectedScriptManager
, client, overlay)); |
252 } | 252 } |
253 | 253 |
254 // static | 254 // static |
255 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) | 255 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) |
256 { | 256 { |
257 DocumentLoader* loader = assertDocumentLoader(errorString, frame); | 257 DocumentLoader* loader = assertDocumentLoader(errorString, frame); |
258 if (!loader) | 258 if (!loader) |
259 return; | 259 return; |
260 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) | 260 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) |
261 *errorString = "No resource with given URL found"; | 261 *errorString = "No resource with given URL found"; |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 } | 1327 } |
1328 | 1328 |
1329 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) | 1329 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) |
1330 { | 1330 { |
1331 if (!m_editedResourceContent.contains(url)) | 1331 if (!m_editedResourceContent.contains(url)) |
1332 return false; | 1332 return false; |
1333 *content = m_editedResourceContent.get(url); | 1333 *content = m_editedResourceContent.get(url); |
1334 return true; | 1334 return true; |
1335 } | 1335 } |
1336 | 1336 |
| 1337 void InspectorPageAgent::trace(Visitor* visitor) |
| 1338 { |
| 1339 visitor->trace(m_page); |
| 1340 InspectorBaseAgent::trace(visitor); |
| 1341 } |
| 1342 |
1337 } // namespace WebCore | 1343 } // namespace WebCore |
1338 | 1344 |
OLD | NEW |