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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) | 298 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) |
299 { | 299 { |
300 if (withBase64Encode) { | 300 if (withBase64Encode) { |
301 *result = base64Encode(data, size); | 301 *result = base64Encode(data, size); |
302 return true; | 302 return true; |
303 } | 303 } |
304 | 304 |
305 return decodeBuffer(data, size, textEncodingName, result); | 305 return decodeBuffer(data, size, textEncodingName, result); |
306 } | 306 } |
307 | 307 |
308 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page, InjectedSc
riptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* o
verlay) | 308 PassOwnPtrWillBeRawPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page
, InjectedScriptManager* injectedScriptManager, InspectorClient* client, Inspect
orOverlay* overlay) |
309 { | 309 { |
310 return adoptPtr(new InspectorPageAgent(page, injectedScriptManager, client,
overlay)); | 310 return adoptPtrWillBeNoop(new InspectorPageAgent(page, injectedScriptManager
, client, overlay)); |
311 } | 311 } |
312 | 312 |
313 Resource* InspectorPageAgent::cachedResource(LocalFrame* frame, const KURL& url) | 313 Resource* InspectorPageAgent::cachedResource(LocalFrame* frame, const KURL& url) |
314 { | 314 { |
315 Document* document = frame->document(); | 315 Document* document = frame->document(); |
316 if (!document) | 316 if (!document) |
317 return 0; | 317 return 0; |
318 Resource* cachedResource = document->fetcher()->cachedResource(url); | 318 Resource* cachedResource = document->fetcher()->cachedResource(url); |
319 if (!cachedResource) { | 319 if (!cachedResource) { |
320 Vector<Document*> allImports = InspectorPageAgent::importsForFrame(frame
); | 320 Vector<Document*> allImports = InspectorPageAgent::importsForFrame(frame
); |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 } | 1430 } |
1431 | 1431 |
1432 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) | 1432 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) |
1433 { | 1433 { |
1434 if (!m_editedResourceContent.contains(url)) | 1434 if (!m_editedResourceContent.contains(url)) |
1435 return false; | 1435 return false; |
1436 *content = m_editedResourceContent.get(url); | 1436 *content = m_editedResourceContent.get(url); |
1437 return true; | 1437 return true; |
1438 } | 1438 } |
1439 | 1439 |
| 1440 void InspectorPageAgent::trace(Visitor* visitor) |
| 1441 { |
| 1442 visitor->trace(m_page); |
| 1443 InspectorBaseAgent::trace(visitor); |
| 1444 } |
| 1445 |
1440 } // namespace WebCore | 1446 } // namespace WebCore |
1441 | 1447 |
OLD | NEW |