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

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

Issue 12224049: Merge 140539 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 namespace WebCore { 80 namespace WebCore {
81 81
82 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient) 82 InspectorController::InspectorController(Page* page, InspectorClient* inspectorC lient)
83 : m_instrumentingAgents(InstrumentingAgents::create()) 83 : m_instrumentingAgents(InstrumentingAgents::create())
84 , m_injectedScriptManager(InjectedScriptManager::createForPage()) 84 , m_injectedScriptManager(InjectedScriptManager::createForPage())
85 , m_state(adoptPtr(new InspectorState(inspectorClient))) 85 , m_state(adoptPtr(new InspectorState(inspectorClient)))
86 , m_overlay(InspectorOverlay::create(page, inspectorClient)) 86 , m_overlay(InspectorOverlay::create(page, inspectorClient))
87 , m_page(page) 87 , m_page(page)
88 , m_inspectorClient(inspectorClient) 88 , m_inspectorClient(inspectorClient)
89 , m_isUnderTest(false)
89 { 90 {
90 OwnPtr<InspectorAgent> inspectorAgentPtr(InspectorAgent::create(page, m_inje ctedScriptManager.get(), m_instrumentingAgents.get(), m_state.get())); 91 OwnPtr<InspectorAgent> inspectorAgentPtr(InspectorAgent::create(page, m_inje ctedScriptManager.get(), m_instrumentingAgents.get(), m_state.get()));
91 m_inspectorAgent = inspectorAgentPtr.get(); 92 m_inspectorAgent = inspectorAgentPtr.get();
92 m_agents.append(inspectorAgentPtr.release()); 93 m_agents.append(inspectorAgentPtr.release());
93 94
94 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_instrum entingAgents.get(), page, m_inspectorAgent, m_state.get(), m_injectedScriptManag er.get(), inspectorClient, m_overlay.get())); 95 OwnPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_instrum entingAgents.get(), page, m_inspectorAgent, m_state.get(), m_injectedScriptManag er.get(), inspectorClient, m_overlay.get()));
95 InspectorPageAgent* pageAgent = pageAgentPtr.get(); 96 InspectorPageAgent* pageAgent = pageAgentPtr.get();
96 m_pageAgent = pageAgentPtr.get(); 97 m_pageAgent = pageAgentPtr.get();
97 m_agents.append(pageAgentPtr.release()); 98 m_agents.append(pageAgentPtr.release());
98 99
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 void InspectorController::setProcessId(long processId) 292 void InspectorController::setProcessId(long processId)
292 { 293 {
293 IdentifiersFactory::setProcessId(processId); 294 IdentifiersFactory::setProcessId(processId);
294 } 295 }
295 296
296 void InspectorController::webViewResized(const IntSize& size) 297 void InspectorController::webViewResized(const IntSize& size)
297 { 298 {
298 m_pageAgent->webViewResized(size); 299 m_pageAgent->webViewResized(size);
299 } 300 }
300 301
302 bool InspectorController::isUnderTest()
303 {
304 return m_isUnderTest;
305 }
306
301 void InspectorController::evaluateForTestInFrontend(long callId, const String& s cript) 307 void InspectorController::evaluateForTestInFrontend(long callId, const String& s cript)
302 { 308 {
309 m_isUnderTest = true;
303 m_inspectorAgent->evaluateForTestInFrontend(callId, script); 310 m_inspectorAgent->evaluateForTestInFrontend(callId, script);
304 } 311 }
305 312
306 void InspectorController::drawHighlight(GraphicsContext& context) const 313 void InspectorController::drawHighlight(GraphicsContext& context) const
307 { 314 {
308 m_overlay->paint(context); 315 m_overlay->paint(context);
309 } 316 }
310 317
311 void InspectorController::getHighlight(Highlight* highlight) const 318 void InspectorController::getHighlight(Highlight* highlight) const
312 { 319 {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 425
419 void InspectorController::didProcessTask() 426 void InspectorController::didProcessTask()
420 { 427 {
421 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent()) 428 if (InspectorTimelineAgent* timelineAgent = m_instrumentingAgents->inspector TimelineAgent())
422 timelineAgent->didProcessTask(); 429 timelineAgent->didProcessTask();
423 } 430 }
424 431
425 } // namespace WebCore 432 } // namespace WebCore
426 433
427 #endif // ENABLE(INSPECTOR) 434 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorController.h ('k') | Source/WebCore/inspector/InspectorFrontendClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698