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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) | 236 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) |
237 { | 237 { |
238 if (withBase64Encode) { | 238 if (withBase64Encode) { |
239 *result = base64Encode(data, size); | 239 *result = base64Encode(data, size); |
240 return true; | 240 return true; |
241 } | 241 } |
242 | 242 |
243 return decodeBuffer(data, size, textEncodingName, result); | 243 return decodeBuffer(data, size, textEncodingName, result); |
244 } | 244 } |
245 | 245 |
246 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page, InjectedSc
riptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* o
verlay) | 246 PassOwnPtrWillBeRawPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page
, InjectedScriptManager* injectedScriptManager, InspectorClient* client, Inspect
orOverlay* overlay) |
247 { | 247 { |
248 return adoptPtr(new InspectorPageAgent(page, injectedScriptManager, client,
overlay)); | 248 return adoptPtrWillBeNoop(new InspectorPageAgent(page, injectedScriptManager
, client, overlay)); |
249 } | 249 } |
250 | 250 |
251 // static | 251 // static |
252 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) | 252 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) |
253 { | 253 { |
254 DocumentLoader* loader = assertDocumentLoader(errorString, frame); | 254 DocumentLoader* loader = assertDocumentLoader(errorString, frame); |
255 if (!loader) | 255 if (!loader) |
256 return; | 256 return; |
257 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) | 257 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) |
258 *errorString = "No resource with given URL found"; | 258 *errorString = "No resource with given URL found"; |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 } | 1282 } |
1283 return true; | 1283 return true; |
1284 } | 1284 } |
1285 | 1285 |
1286 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1286 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
1287 { | 1287 { |
1288 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1288 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1289 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1289 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
1290 } | 1290 } |
1291 | 1291 |
| 1292 void InspectorPageAgent::trace(Visitor* visitor) |
| 1293 { |
| 1294 visitor->trace(m_page); |
| 1295 InspectorBaseAgent::trace(visitor); |
| 1296 } |
| 1297 |
1292 } // namespace WebCore | 1298 } // namespace WebCore |
1293 | 1299 |
OLD | NEW |