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

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

Issue 717003002: Animations: Allow document animation timelines to have a playback rate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review changes Created 6 years, 1 month 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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/inspector/InspectorPageAgent.h" 32 #include "core/inspector/InspectorPageAgent.h"
33 33
34 #include "bindings/core/v8/DOMWrapperWorld.h" 34 #include "bindings/core/v8/DOMWrapperWorld.h"
35 #include "bindings/core/v8/ScriptController.h" 35 #include "bindings/core/v8/ScriptController.h"
36 #include "bindings/core/v8/ScriptRegexp.h" 36 #include "bindings/core/v8/ScriptRegexp.h"
37 #include "core/HTMLNames.h" 37 #include "core/HTMLNames.h"
38 #include "core/UserAgentStyleSheets.h" 38 #include "core/UserAgentStyleSheets.h"
39 #include "core/animation/AnimationTimeline.h"
39 #include "core/css/StyleSheetContents.h" 40 #include "core/css/StyleSheetContents.h"
40 #include "core/css/resolver/StyleResolver.h" 41 #include "core/css/resolver/StyleResolver.h"
41 #include "core/css/resolver/ViewportStyleResolver.h" 42 #include "core/css/resolver/ViewportStyleResolver.h"
42 #include "core/dom/DOMImplementation.h" 43 #include "core/dom/DOMImplementation.h"
43 #include "core/dom/Document.h" 44 #include "core/dom/Document.h"
44 #include "core/fetch/CSSStyleSheetResource.h" 45 #include "core/fetch/CSSStyleSheetResource.h"
45 #include "core/fetch/FontResource.h" 46 #include "core/fetch/FontResource.h"
46 #include "core/fetch/ImageResource.h" 47 #include "core/fetch/ImageResource.h"
47 #include "core/fetch/MemoryCache.h" 48 #include "core/fetch/MemoryCache.h"
48 #include "core/fetch/Resource.h" 49 #include "core/fetch/Resource.h"
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 { 1469 {
1469 m_state->setBoolean(PageAgentState::screencastEnabled, false); 1470 m_state->setBoolean(PageAgentState::screencastEnabled, false);
1470 } 1471 }
1471 1472
1472 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) 1473 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid)
1473 { 1474 {
1474 m_state->setBoolean(PageAgentState::showSizeOnResize, show); 1475 m_state->setBoolean(PageAgentState::showSizeOnResize, show);
1475 m_state->setBoolean(PageAgentState::showGridOnResize, asBool(showGrid)); 1476 m_state->setBoolean(PageAgentState::showGridOnResize, asBool(showGrid));
1476 } 1477 }
1477 1478
1479 void InspectorPageAgent::setAnimationsPlaybackRate(ErrorString*, double playback Rate)
1480 {
1481 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) {
1482 if (frame->isLocalFrame())
1483 toLocalFrame(frame)->document()->timeline().setPlaybackRate(playback Rate);
1484 }
1485 }
1486
1478 void InspectorPageAgent::clearEditedResourcesContent() 1487 void InspectorPageAgent::clearEditedResourcesContent()
1479 { 1488 {
1480 m_editedResourceContent.clear(); 1489 m_editedResourceContent.clear();
1481 } 1490 }
1482 1491
1483 void InspectorPageAgent::addEditedResourceContent(const String& url, const Strin g& content) 1492 void InspectorPageAgent::addEditedResourceContent(const String& url, const Strin g& content)
1484 { 1493 {
1485 m_editedResourceContent.set(url, content); 1494 m_editedResourceContent.set(url, content);
1486 } 1495 }
1487 1496
1488 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con tent) 1497 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con tent)
1489 { 1498 {
1490 if (!m_editedResourceContent.contains(url)) 1499 if (!m_editedResourceContent.contains(url))
1491 return false; 1500 return false;
1492 *content = m_editedResourceContent.get(url); 1501 *content = m_editedResourceContent.get(url);
1493 return true; 1502 return true;
1494 } 1503 }
1495 1504
1496 void InspectorPageAgent::trace(Visitor* visitor) 1505 void InspectorPageAgent::trace(Visitor* visitor)
1497 { 1506 {
1498 visitor->trace(m_page); 1507 visitor->trace(m_page);
1499 visitor->trace(m_injectedScriptManager); 1508 visitor->trace(m_injectedScriptManager);
1500 visitor->trace(m_inspectorResourceContentLoader); 1509 visitor->trace(m_inspectorResourceContentLoader);
1501 InspectorBaseAgent::trace(visitor); 1510 InspectorBaseAgent::trace(visitor);
1502 } 1511 }
1503 1512
1504 } // namespace blink 1513 } // namespace blink
1505 1514
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698