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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) | 235 bool InspectorPageAgent::dataContent(const char* data, unsigned size, const Stri
ng& textEncodingName, bool withBase64Encode, String* result) |
236 { | 236 { |
237 if (withBase64Encode) { | 237 if (withBase64Encode) { |
238 *result = base64Encode(data, size); | 238 *result = base64Encode(data, size); |
239 return true; | 239 return true; |
240 } | 240 } |
241 | 241 |
242 return decodeBuffer(data, size, textEncodingName, result); | 242 return decodeBuffer(data, size, textEncodingName, result); |
243 } | 243 } |
244 | 244 |
245 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page, InjectedSc
riptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* o
verlay) | 245 PassOwnPtrWillBeRawPtr<InspectorPageAgent> InspectorPageAgent::create(Page* page
, InjectedScriptManager* injectedScriptManager, InspectorClient* client, Inspect
orOverlay* overlay) |
246 { | 246 { |
247 return adoptPtr(new InspectorPageAgent(page, injectedScriptManager, client,
overlay)); | 247 return adoptPtrWillBeNoop(new InspectorPageAgent(page, injectedScriptManager
, client, overlay)); |
248 } | 248 } |
249 | 249 |
250 // static | 250 // static |
251 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) | 251 void InspectorPageAgent::resourceContent(ErrorString* errorString, LocalFrame* f
rame, const KURL& url, String* result, bool* base64Encoded) |
252 { | 252 { |
253 DocumentLoader* loader = assertDocumentLoader(errorString, frame); | 253 DocumentLoader* loader = assertDocumentLoader(errorString, frame); |
254 if (!loader) | 254 if (!loader) |
255 return; | 255 return; |
256 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) | 256 if (!cachedResourceContent(cachedResource(frame, url), result, base64Encoded
)) |
257 *errorString = "No resource with given URL found"; | 257 *errorString = "No resource with given URL found"; |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 mainFrame->view()->updateCompositingLayersAfterStyleChange(); | 1267 mainFrame->view()->updateCompositingLayersAfterStyleChange(); |
1268 return true; | 1268 return true; |
1269 } | 1269 } |
1270 | 1270 |
1271 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) | 1271 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
nst bool* showGrid) |
1272 { | 1272 { |
1273 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1273 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1274 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; | 1274 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid)
; |
1275 } | 1275 } |
1276 | 1276 |
| 1277 void InspectorPageAgent::trace(Visitor* visitor) |
| 1278 { |
| 1279 visitor->trace(m_page); |
| 1280 InspectorBaseAgent::trace(visitor); |
| 1281 } |
| 1282 |
1277 } // namespace WebCore | 1283 } // namespace WebCore |
1278 | 1284 |
OLD | NEW |