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

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

Issue 620783002: Devtools Animations: Basic animation inspection & control in Styles pane (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/inspector/InspectorController.h ('k') | Source/devtools/devtools.gypi » ('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 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/inspector/InspectorController.h" 32 #include "core/inspector/InspectorController.h"
33 33
34 #include "bindings/core/v8/DOMWrapperWorld.h" 34 #include "bindings/core/v8/DOMWrapperWorld.h"
35 #include "core/InspectorBackendDispatcher.h" 35 #include "core/InspectorBackendDispatcher.h"
36 #include "core/InspectorFrontend.h" 36 #include "core/InspectorFrontend.h"
37 #include "core/inspector/IdentifiersFactory.h" 37 #include "core/inspector/IdentifiersFactory.h"
38 #include "core/inspector/InjectedScriptHost.h" 38 #include "core/inspector/InjectedScriptHost.h"
39 #include "core/inspector/InjectedScriptManager.h" 39 #include "core/inspector/InjectedScriptManager.h"
40 #include "core/inspector/InspectorAnimationAgent.h"
40 #include "core/inspector/InspectorApplicationCacheAgent.h" 41 #include "core/inspector/InspectorApplicationCacheAgent.h"
41 #include "core/inspector/InspectorCSSAgent.h" 42 #include "core/inspector/InspectorCSSAgent.h"
42 #include "core/inspector/InspectorCanvasAgent.h" 43 #include "core/inspector/InspectorCanvasAgent.h"
43 #include "core/inspector/InspectorClient.h" 44 #include "core/inspector/InspectorClient.h"
44 #include "core/inspector/InspectorDOMAgent.h" 45 #include "core/inspector/InspectorDOMAgent.h"
45 #include "core/inspector/InspectorDOMDebuggerAgent.h" 46 #include "core/inspector/InspectorDOMDebuggerAgent.h"
46 #include "core/inspector/InspectorDOMStorageAgent.h" 47 #include "core/inspector/InspectorDOMStorageAgent.h"
47 #include "core/inspector/InspectorDebuggerAgent.h" 48 #include "core/inspector/InspectorDebuggerAgent.h"
48 #include "core/inspector/InspectorFrontendClient.h" 49 #include "core/inspector/InspectorFrontendClient.h"
49 #include "core/inspector/InspectorHeapProfilerAgent.h" 50 #include "core/inspector/InspectorHeapProfilerAgent.h"
(...skipping 22 matching lines...) Expand all
72 namespace blink { 73 namespace blink {
73 74
74 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient) 75 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient)
75 : m_instrumentingAgents(InstrumentingAgents::create()) 76 : m_instrumentingAgents(InstrumentingAgents::create())
76 , m_injectedScriptManager(InjectedScriptManager::createForPage()) 77 , m_injectedScriptManager(InjectedScriptManager::createForPage())
77 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(inspectorClient))) 78 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(inspectorClient)))
78 , m_overlay(InspectorOverlay::create(page, inspectorClient)) 79 , m_overlay(InspectorOverlay::create(page, inspectorClient))
79 , m_cssAgent(nullptr) 80 , m_cssAgent(nullptr)
80 , m_resourceAgent(nullptr) 81 , m_resourceAgent(nullptr)
81 , m_layerTreeAgent(nullptr) 82 , m_layerTreeAgent(nullptr)
83 , m_animationAgent(nullptr)
82 , m_inspectorFrontendClient(nullptr) 84 , m_inspectorFrontendClient(nullptr)
83 , m_page(page) 85 , m_page(page)
84 , m_inspectorClient(inspectorClient) 86 , m_inspectorClient(inspectorClient)
85 , m_agents(m_instrumentingAgents.get(), m_state.get()) 87 , m_agents(m_instrumentingAgents.get(), m_state.get())
86 , m_isUnderTest(false) 88 , m_isUnderTest(false)
87 , m_deferredAgentsInitialized(false) 89 , m_deferredAgentsInitialized(false)
88 { 90 {
89 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ; 91 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ;
90 InspectorOverlay* overlay = m_overlay.get(); 92 InspectorOverlay* overlay = m_overlay.get();
91 93
92 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r)); 94 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r));
93 95
94 OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::crea te(m_page, injectedScriptManager, inspectorClient, overlay)); 96 OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::crea te(m_page, injectedScriptManager, inspectorClient, overlay));
95 m_pageAgent = pageAgentPtr.get(); 97 m_pageAgent = pageAgentPtr.get();
96 m_agents.append(pageAgentPtr.release()); 98 m_agents.append(pageAgentPtr.release());
97 99
98 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_pageAgent, injectedScriptManager, overlay)); 100 OwnPtrWillBeRawPtr<InspectorDOMAgent> domAgentPtr(InspectorDOMAgent::create( m_pageAgent, injectedScriptManager, overlay));
99 m_domAgent = domAgentPtr.get(); 101 m_domAgent = domAgentPtr.get();
100 m_agents.append(domAgentPtr.release()); 102 m_agents.append(domAgentPtr.release());
101 103
102
103 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_page)); 104 OwnPtrWillBeRawPtr<InspectorLayerTreeAgent> layerTreeAgentPtr(InspectorLayer TreeAgent::create(m_page));
104 m_layerTreeAgent = layerTreeAgentPtr.get(); 105 m_layerTreeAgent = layerTreeAgentPtr.get();
105 m_agents.append(layerTreeAgentPtr.release()); 106 m_agents.append(layerTreeAgentPtr.release());
106 107
107 OwnPtrWillBeRawPtr<InspectorWorkerAgent> workerAgentPtr = InspectorWorkerAge nt::create(); 108 OwnPtrWillBeRawPtr<InspectorWorkerAgent> workerAgentPtr = InspectorWorkerAge nt::create();
108 109
109 OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr = InspectorTracing Agent::create(inspectorClient, workerAgentPtr.get()); 110 OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr = InspectorTracing Agent::create(inspectorClient, workerAgentPtr.get());
110 m_tracingAgent = tracingAgentPtr.get(); 111 m_tracingAgent = tracingAgentPtr.get();
111 m_agents.append(tracingAgentPtr.release()); 112 m_agents.append(tracingAgentPtr.release());
112 113
(...skipping 17 matching lines...) Expand all
130 InspectorController::~InspectorController() 131 InspectorController::~InspectorController()
131 { 132 {
132 } 133 }
133 134
134 void InspectorController::trace(Visitor* visitor) 135 void InspectorController::trace(Visitor* visitor)
135 { 136 {
136 visitor->trace(m_instrumentingAgents); 137 visitor->trace(m_instrumentingAgents);
137 visitor->trace(m_injectedScriptManager); 138 visitor->trace(m_injectedScriptManager);
138 visitor->trace(m_state); 139 visitor->trace(m_state);
139 visitor->trace(m_domAgent); 140 visitor->trace(m_domAgent);
141 visitor->trace(m_animationAgent);
140 visitor->trace(m_pageAgent); 142 visitor->trace(m_pageAgent);
141 visitor->trace(m_timelineAgent); 143 visitor->trace(m_timelineAgent);
142 visitor->trace(m_cssAgent); 144 visitor->trace(m_cssAgent);
143 visitor->trace(m_resourceAgent); 145 visitor->trace(m_resourceAgent);
144 visitor->trace(m_layerTreeAgent); 146 visitor->trace(m_layerTreeAgent);
145 visitor->trace(m_tracingAgent); 147 visitor->trace(m_tracingAgent);
146 visitor->trace(m_inspectorBackendDispatcher); 148 visitor->trace(m_inspectorBackendDispatcher);
147 visitor->trace(m_page); 149 visitor->trace(m_page);
148 visitor->trace(m_agents); 150 visitor->trace(m_agents);
149 } 151 }
(...skipping 28 matching lines...) Expand all
178 InspectorOverlay* overlay = m_overlay.get(); 180 InspectorOverlay* overlay = m_overlay.get();
179 181
180 OwnPtrWillBeRawPtr<InspectorResourceAgent> resourceAgentPtr(InspectorResourc eAgent::create(m_pageAgent)); 182 OwnPtrWillBeRawPtr<InspectorResourceAgent> resourceAgentPtr(InspectorResourc eAgent::create(m_pageAgent));
181 m_resourceAgent = resourceAgentPtr.get(); 183 m_resourceAgent = resourceAgentPtr.get();
182 m_agents.append(resourceAgentPtr.release()); 184 m_agents.append(resourceAgentPtr.release());
183 185
184 OwnPtrWillBeRawPtr<InspectorCSSAgent> cssAgentPtr(InspectorCSSAgent::create( m_domAgent, m_pageAgent, m_resourceAgent)); 186 OwnPtrWillBeRawPtr<InspectorCSSAgent> cssAgentPtr(InspectorCSSAgent::create( m_domAgent, m_pageAgent, m_resourceAgent));
185 m_cssAgent = cssAgentPtr.get(); 187 m_cssAgent = cssAgentPtr.get();
186 m_agents.append(cssAgentPtr.release()); 188 m_agents.append(cssAgentPtr.release());
187 189
190 OwnPtrWillBeRawPtr<InspectorAnimationAgent> animationAgentPtr(InspectorAnima tionAgent::create(m_domAgent));
191 m_animationAgent = animationAgentPtr.get();
192 m_agents.append(animationAgentPtr.release());
193
188 m_agents.append(InspectorDOMStorageAgent::create(m_pageAgent)); 194 m_agents.append(InspectorDOMStorageAgent::create(m_pageAgent));
189 195
190 m_agents.append(InspectorMemoryAgent::create()); 196 m_agents.append(InspectorMemoryAgent::create());
191 197
192 m_agents.append(InspectorApplicationCacheAgent::create(m_pageAgent)); 198 m_agents.append(InspectorApplicationCacheAgent::create(m_pageAgent));
193 199
194 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share d(); 200 PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::share d();
195 201
196 OwnPtrWillBeRawPtr<InspectorDebuggerAgent> debuggerAgentPtr(PageDebuggerAgen t::create(pageScriptDebugServer, m_pageAgent, injectedScriptManager, overlay)); 202 OwnPtrWillBeRawPtr<InspectorDebuggerAgent> debuggerAgentPtr(PageDebuggerAgen t::create(pageScriptDebugServer, m_pageAgent, injectedScriptManager, overlay));
197 InspectorDebuggerAgent* debuggerAgent = debuggerAgentPtr.get(); 203 InspectorDebuggerAgent* debuggerAgent = debuggerAgentPtr.get();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 m_layerTreeAgent->willAddPageOverlay(layer); 523 m_layerTreeAgent->willAddPageOverlay(layer);
518 } 524 }
519 525
520 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) 526 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer)
521 { 527 {
522 if (m_layerTreeAgent) 528 if (m_layerTreeAgent)
523 m_layerTreeAgent->didRemovePageOverlay(layer); 529 m_layerTreeAgent->didRemovePageOverlay(layer);
524 } 530 }
525 531
526 } // namespace blink 532 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorController.h ('k') | Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698