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

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: Addressed feedback. Created 6 years, 8 months 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 if (!cachedResource) 268 if (!cachedResource)
269 cachedResource = memoryCache()->resourceForURL(url); 269 cachedResource = memoryCache()->resourceForURL(url);
270 return cachedResource; 270 return cachedResource;
271 } 271 }
272 272
273 TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(Inspe ctorPageAgent::ResourceType resourceType) 273 TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(Inspe ctorPageAgent::ResourceType resourceType)
274 { 274 {
275 switch (resourceType) { 275 switch (resourceType) {
276 case DocumentResource: 276 case DocumentResource:
277 return TypeBuilder::Page::ResourceType::Document; 277 return TypeBuilder::Page::ResourceType::Document;
278 case FontResource:
279 return TypeBuilder::Page::ResourceType::Font;
278 case ImageResource: 280 case ImageResource:
279 return TypeBuilder::Page::ResourceType::Image; 281 return TypeBuilder::Page::ResourceType::Image;
280 case Font: 282 case MediaResource:
281 return TypeBuilder::Page::ResourceType::Font; 283 return TypeBuilder::Page::ResourceType::Media;
284 case ScriptResource:
285 return TypeBuilder::Page::ResourceType::Script;
282 case StylesheetResource: 286 case StylesheetResource:
283 return TypeBuilder::Page::ResourceType::Stylesheet; 287 return TypeBuilder::Page::ResourceType::Stylesheet;
284 case ScriptResource: 288 case TextTrackResource:
285 return TypeBuilder::Page::ResourceType::Script; 289 return TypeBuilder::Page::ResourceType::TextTrack;
286 case XHRResource: 290 case XHRResource:
287 return TypeBuilder::Page::ResourceType::XHR; 291 return TypeBuilder::Page::ResourceType::XHR;
288 case WebSocketResource: 292 case WebSocketResource:
289 return TypeBuilder::Page::ResourceType::WebSocket; 293 return TypeBuilder::Page::ResourceType::WebSocket;
290 case OtherResource: 294 case OtherResource:
291 return TypeBuilder::Page::ResourceType::Other; 295 return TypeBuilder::Page::ResourceType::Other;
292 } 296 }
293 return TypeBuilder::Page::ResourceType::Other; 297 return TypeBuilder::Page::ResourceType::Other;
294 } 298 }
295 299
296 InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const Re source& cachedResource) 300 InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const Re source& cachedResource)
297 { 301 {
298 switch (cachedResource.type()) { 302 switch (cachedResource.type()) {
299 case Resource::Image: 303 case Resource::Image:
300 return InspectorPageAgent::ImageResource; 304 return InspectorPageAgent::ImageResource;
301 case Resource::Font: 305 case Resource::Font:
302 return InspectorPageAgent::Font; 306 return InspectorPageAgent::FontResource;
307 case Resource::Media:
308 return InspectorPageAgent::MediaResource;
309 case Resource::TextTrack:
310 return InspectorPageAgent::TextTrackResource;
303 case Resource::CSSStyleSheet: 311 case Resource::CSSStyleSheet:
304 // Fall through. 312 // Fall through.
305 case Resource::XSLStyleSheet: 313 case Resource::XSLStyleSheet:
306 return InspectorPageAgent::StylesheetResource; 314 return InspectorPageAgent::StylesheetResource;
307 case Resource::Script: 315 case Resource::Script:
308 return InspectorPageAgent::ScriptResource; 316 return InspectorPageAgent::ScriptResource;
309 case Resource::Raw: 317 case Resource::Raw:
310 return InspectorPageAgent::XHRResource; 318 return InspectorPageAgent::XHRResource;
311 case Resource::ImportResource: 319 case Resource::ImportResource:
312 // Fall through. 320 // Fall through.
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 } 1229 }
1222 1230
1223 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1231 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1224 { 1232 {
1225 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1233 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1226 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; 1234 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ;
1227 } 1235 }
1228 1236
1229 } // namespace WebCore 1237 } // namespace WebCore
1230 1238
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