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

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

Issue 481913002: [DevTools] Merge InspectorFrontendClientImpl into WebDevToolsFrontendImpl and remove unused code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 namespace blink { 72 namespace blink {
73 73
74 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient) 74 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient)
75 : m_instrumentingAgents(InstrumentingAgents::create()) 75 : m_instrumentingAgents(InstrumentingAgents::create())
76 , m_injectedScriptManager(InjectedScriptManager::createForPage()) 76 , m_injectedScriptManager(InjectedScriptManager::createForPage())
77 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(inspectorClient))) 77 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(inspectorClient)))
78 , m_overlay(InspectorOverlay::create(page, inspectorClient)) 78 , m_overlay(InspectorOverlay::create(page, inspectorClient))
79 , m_cssAgent(nullptr) 79 , m_cssAgent(nullptr)
80 , m_resourceAgent(nullptr) 80 , m_resourceAgent(nullptr)
81 , m_layerTreeAgent(nullptr) 81 , m_layerTreeAgent(nullptr)
82 , m_inspectorFrontendClient(nullptr)
82 , m_page(page) 83 , m_page(page)
83 , m_inspectorClient(inspectorClient) 84 , m_inspectorClient(inspectorClient)
84 , m_agents(m_instrumentingAgents.get(), m_state.get()) 85 , m_agents(m_instrumentingAgents.get(), m_state.get())
85 , m_isUnderTest(false) 86 , m_isUnderTest(false)
86 , m_deferredAgentsInitialized(false) 87 , m_deferredAgentsInitialized(false)
87 { 88 {
88 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ; 89 InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get() ;
89 InspectorOverlay* overlay = m_overlay.get(); 90 InspectorOverlay* overlay = m_overlay.get();
90 91
91 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r)); 92 m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManage r));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 visitor->trace(m_instrumentingAgents); 136 visitor->trace(m_instrumentingAgents);
136 visitor->trace(m_injectedScriptManager); 137 visitor->trace(m_injectedScriptManager);
137 visitor->trace(m_state); 138 visitor->trace(m_state);
138 visitor->trace(m_domAgent); 139 visitor->trace(m_domAgent);
139 visitor->trace(m_pageAgent); 140 visitor->trace(m_pageAgent);
140 visitor->trace(m_timelineAgent); 141 visitor->trace(m_timelineAgent);
141 visitor->trace(m_cssAgent); 142 visitor->trace(m_cssAgent);
142 visitor->trace(m_resourceAgent); 143 visitor->trace(m_resourceAgent);
143 visitor->trace(m_layerTreeAgent); 144 visitor->trace(m_layerTreeAgent);
144 visitor->trace(m_tracingAgent); 145 visitor->trace(m_tracingAgent);
145 visitor->trace(m_inspectorFrontendClient);
146 visitor->trace(m_page); 146 visitor->trace(m_page);
147 visitor->trace(m_agents); 147 visitor->trace(m_agents);
148 } 148 }
149 149
150 PassOwnPtrWillBeRawPtr<InspectorController> InspectorController::create(Page* pa ge, InspectorClient* client) 150 PassOwnPtrWillBeRawPtr<InspectorController> InspectorController::create(Page* pa ge, InspectorClient* client)
151 { 151 {
152 return adoptPtrWillBeNoop(new InspectorController(page, client)); 152 return adoptPtrWillBeNoop(new InspectorController(page, client));
153 } 153 }
154 154
155 void InspectorController::setTextAutosizingEnabled(bool enabled) 155 void InspectorController::setTextAutosizingEnabled(bool enabled)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 m_agents.discardAgents(); 212 m_agents.discardAgents();
213 if (m_inspectorFrontendClient) 213 if (m_inspectorFrontendClient)
214 m_inspectorFrontendClient->dispose(); 214 m_inspectorFrontendClient->dispose();
215 } 215 }
216 216
217 void InspectorController::registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAg ent> agent) 217 void InspectorController::registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAg ent> agent)
218 { 218 {
219 m_agents.append(agent); 219 m_agents.append(agent);
220 } 220 }
221 221
222 void InspectorController::setInspectorFrontendClient(PassOwnPtrWillBeRawPtr<Insp ectorFrontendClient> inspectorFrontendClient) 222 void InspectorController::setInspectorFrontendClient(InspectorFrontendClient* in spectorFrontendClient)
223 { 223 {
224 m_inspectorFrontendClient = inspectorFrontendClient; 224 m_inspectorFrontendClient = inspectorFrontendClient;
225 } 225 }
226 226
227 void InspectorController::didClearDocumentOfWindowObject(LocalFrame* frame) 227 void InspectorController::didClearDocumentOfWindowObject(LocalFrame* frame)
228 { 228 {
229 // If the page is supposed to serve as InspectorFrontend notify inspector fr ontend 229 // If the page is supposed to serve as InspectorFrontend notify inspector fr ontend
230 // client that it's cleared so that the client can expose inspector bindings . 230 // client that it's cleared so that the client can expose inspector bindings .
231 if (m_inspectorFrontendClient && frame == m_page->mainFrame()) 231 if (m_inspectorFrontendClient && frame == m_page->mainFrame())
232 m_inspectorFrontendClient->windowObjectCleared(); 232 m_inspectorFrontendClient->windowObjectCleared();
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 m_layerTreeAgent->willAddPageOverlay(layer); 502 m_layerTreeAgent->willAddPageOverlay(layer);
503 } 503 }
504 504
505 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) 505 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer)
506 { 506 {
507 if (m_layerTreeAgent) 507 if (m_layerTreeAgent)
508 m_layerTreeAgent->didRemovePageOverlay(layer); 508 m_layerTreeAgent->didRemovePageOverlay(layer);
509 } 509 }
510 510
511 } // namespace blink 511 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698