Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 114123005: Show media and VTT text tracks in the devtools. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated broken test Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
263 if (!cachedResource) 263 if (!cachedResource)
264 cachedResource = memoryCache()->resourceForURL(url); 264 cachedResource = memoryCache()->resourceForURL(url);
265 return cachedResource; 265 return cachedResource;
266 } 266 }
267 267
268 TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(Inspe ctorPageAgent::ResourceType resourceType) 268 TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(Inspe ctorPageAgent::ResourceType resourceType)
269 { 269 {
270 switch (resourceType) { 270 switch (resourceType) {
271 case DocumentResource: 271 case DocumentResource:
272 return TypeBuilder::Page::ResourceType::Document; 272 return TypeBuilder::Page::ResourceType::Document;
273 case FontResource:
274 return TypeBuilder::Page::ResourceType::Font;
273 case ImageResource: 275 case ImageResource:
274 return TypeBuilder::Page::ResourceType::Image; 276 return TypeBuilder::Page::ResourceType::Image;
275 case Font: 277 case MediaResource:
276 return TypeBuilder::Page::ResourceType::Font; 278 return TypeBuilder::Page::ResourceType::Media;
279 case ScriptResource:
280 return TypeBuilder::Page::ResourceType::Script;
277 case StylesheetResource: 281 case StylesheetResource:
278 return TypeBuilder::Page::ResourceType::Stylesheet; 282 return TypeBuilder::Page::ResourceType::Stylesheet;
279 case ScriptResource: 283 case TextTrackResource:
280 return TypeBuilder::Page::ResourceType::Script; 284 return TypeBuilder::Page::ResourceType::TextTrack;
281 case XHRResource: 285 case XHRResource:
282 return TypeBuilder::Page::ResourceType::XHR; 286 return TypeBuilder::Page::ResourceType::XHR;
283 case WebSocketResource: 287 case WebSocketResource:
284 return TypeBuilder::Page::ResourceType::WebSocket; 288 return TypeBuilder::Page::ResourceType::WebSocket;
285 case OtherResource: 289 case OtherResource:
286 return TypeBuilder::Page::ResourceType::Other; 290 return TypeBuilder::Page::ResourceType::Other;
287 } 291 }
288 return TypeBuilder::Page::ResourceType::Other; 292 return TypeBuilder::Page::ResourceType::Other;
289 } 293 }
290 294
291 InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const Re source& cachedResource) 295 InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const Re source& cachedResource)
292 { 296 {
293 switch (cachedResource.type()) { 297 switch (cachedResource.type()) {
294 case Resource::Image: 298 case Resource::Image:
295 return InspectorPageAgent::ImageResource; 299 return InspectorPageAgent::ImageResource;
296 case Resource::Font: 300 case Resource::Font:
297 return InspectorPageAgent::Font; 301 return InspectorPageAgent::FontResource;
302 case Resource::Media:
303 return InspectorPageAgent::MediaResource;
304 case Resource::TextTrack:
305 return InspectorPageAgent::TextTrackResource;
298 case Resource::CSSStyleSheet: 306 case Resource::CSSStyleSheet:
299 // Fall through. 307 // Fall through.
300 case Resource::XSLStyleSheet: 308 case Resource::XSLStyleSheet:
301 return InspectorPageAgent::StylesheetResource; 309 return InspectorPageAgent::StylesheetResource;
302 case Resource::Script: 310 case Resource::Script:
303 return InspectorPageAgent::ScriptResource; 311 return InspectorPageAgent::ScriptResource;
304 case Resource::Raw: 312 case Resource::Raw:
305 return InspectorPageAgent::XHRResource; 313 return InspectorPageAgent::XHRResource;
306 case Resource::MainResource: 314 case Resource::MainResource:
307 return InspectorPageAgent::DocumentResource; 315 return InspectorPageAgent::DocumentResource;
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 } 1277 }
1270 1278
1271 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1279 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1272 { 1280 {
1273 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1281 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1274 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; 1282 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ;
1275 } 1283 }
1276 1284
1277 } // namespace WebCore 1285 } // namespace WebCore
1278 1286
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698