| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 case Resource::kCSSStyleSheet: | 274 case Resource::kCSSStyleSheet: |
| 275 MaybeEncodeTextContent( | 275 MaybeEncodeTextContent( |
| 276 ToCSSStyleSheetResource(cached_resource) | 276 ToCSSStyleSheetResource(cached_resource) |
| 277 ->SheetText(CSSStyleSheetResource::MIMETypeCheck::kLax), | 277 ->SheetText(CSSStyleSheetResource::MIMETypeCheck::kLax), |
| 278 cached_resource->ResourceBuffer(), result, base64_encoded); | 278 cached_resource->ResourceBuffer(), result, base64_encoded); |
| 279 return true; | 279 return true; |
| 280 case Resource::kScript: | 280 case Resource::kScript: |
| 281 MaybeEncodeTextContent( | 281 MaybeEncodeTextContent( |
| 282 cached_resource->ResourceBuffer() | 282 cached_resource->ResourceBuffer() |
| 283 ? ToScriptResource(cached_resource)->DecodedText() | 283 ? ToScriptResource(cached_resource)->DecodedText() |
| 284 : ToScriptResource(cached_resource)->SourceText(), | 284 : ToScriptResource(cached_resource)->ResourceData()->SourceText(), |
| 285 cached_resource->ResourceBuffer(), result, base64_encoded); | 285 cached_resource->ResourceBuffer(), result, base64_encoded); |
| 286 return true; | 286 return true; |
| 287 default: | 287 default: |
| 288 String text_encoding_name = | 288 String text_encoding_name = |
| 289 cached_resource->GetResponse().TextEncodingName(); | 289 cached_resource->GetResponse().TextEncodingName(); |
| 290 if (text_encoding_name.IsEmpty() && | 290 if (text_encoding_name.IsEmpty() && |
| 291 cached_resource->GetType() != Resource::kRaw) | 291 cached_resource->GetType() != Resource::kRaw) |
| 292 text_encoding_name = "WinLatin1"; | 292 text_encoding_name = "WinLatin1"; |
| 293 return InspectorPageAgent::SharedBufferContent( | 293 return InspectorPageAgent::SharedBufferContent( |
| 294 cached_resource->ResourceBuffer(), | 294 cached_resource->ResourceBuffer(), |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 return Response::OK(); | 995 return Response::OK(); |
| 996 } | 996 } |
| 997 | 997 |
| 998 DEFINE_TRACE(InspectorPageAgent) { | 998 DEFINE_TRACE(InspectorPageAgent) { |
| 999 visitor->Trace(inspected_frames_); | 999 visitor->Trace(inspected_frames_); |
| 1000 visitor->Trace(inspector_resource_content_loader_); | 1000 visitor->Trace(inspector_resource_content_loader_); |
| 1001 InspectorBaseAgent::Trace(visitor); | 1001 InspectorBaseAgent::Trace(visitor); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace blink | 1004 } // namespace blink |
| OLD | NEW |