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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) | 263 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) |
264 { | 264 { |
265 if (withBase64Encode) { | 265 if (withBase64Encode) { |
266 *result = base64Encode(data, size); | 266 *result = base64Encode(data, size); |
267 return true; | 267 return true; |
268 } | 268 } |
269 | 269 |
270 return decodeBuffer(data, size, textEncodingName, result); | 270 return decodeBuffer(data, size, textEncodingName, result); |
271 } | 271 } |
272 | 272 |
273 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page, InjectedSc
riptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* o
verlay) | 273 PassOwnPtrWillBeRawPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page
, InjectedScriptManager* injectedScriptManager, InspectorClient* client, Inspect
orOverlay* overlay) |
274 { | 274 { |
275 return adoptPtr(new InspectorPageAgent(page, injectedScriptManager, client,
overlay)); | 275 return adoptPtrWillBeNoop(new InspectorPageAgent(page, injectedScriptManager
, client, overlay)); |
276 } | 276 } |
277 | 277 |
278 // static | 278 // static |
279 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) | 279 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) |
280 { | 280 { |
281 DocumentLoader* loader = assertDocumentLoader(errorString, frame); | 281 DocumentLoader* loader = assertDocumentLoader(errorString, frame); |
282 if (!loader) | 282 if (!loader) |
283 return; | 283 return; |
284 | 284 |
285 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) | 285 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 } | 1337 } |
1338 return true; | 1338 return true; |
1339 } | 1339 } |
1340 | 1340 |
1341 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1341 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
1342 { | 1342 { |
1343 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1343 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1344 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1344 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
1345 } | 1345 } |
1346 | 1346 |
| 1347 void InspectorPageAgent::trace(Visitor* visitor) |
| 1348 { |
| 1349 visitor->trace(m_page); |
| 1350 InspectorBaseAgent::trace(visitor); |
| 1351 } |
| 1352 |
1347 } // namespace WebCore | 1353 } // namespace WebCore |
1348 | 1354 |
OLD | NEW |