OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 using WebCore::TypeBuilder::Canvas::TraceLog; | 55 using WebCore::TypeBuilder::Canvas::TraceLog; |
56 using WebCore::TypeBuilder::Canvas::TraceLogId; | 56 using WebCore::TypeBuilder::Canvas::TraceLogId; |
57 using WebCore::TypeBuilder::Network::FrameId; | 57 using WebCore::TypeBuilder::Network::FrameId; |
58 | 58 |
59 namespace WebCore { | 59 namespace WebCore { |
60 | 60 |
61 namespace CanvasAgentState { | 61 namespace CanvasAgentState { |
62 static const char canvasAgentEnabled[] = "canvasAgentEnabled"; | 62 static const char canvasAgentEnabled[] = "canvasAgentEnabled"; |
63 }; | 63 }; |
64 | 64 |
65 InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAge
nts, InspectorCompositeState* state, InspectorPageAgent* pageAgent, InjectedScri
ptManager* injectedScriptManager) | 65 PassRefPtr<InspectorCanvasAgent> InspectorCanvasAgent::create(InstrumentingAgent
s* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pa
geAgent, InjectedScriptManager* injectedScriptManager) |
66 : InspectorBaseAgent<InspectorCanvasAgent>("Canvas", instrumentingAgents, st
ate) | 66 { |
| 67 return adoptRef(new InspectorCanvasAgent(instrumentingAgents, state, pageAge
nt, injectedScriptManager)); |
| 68 } |
| 69 |
| 70 InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAge
nts, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InjectedSc
riptManager* injectedScriptManager) |
| 71 : InspectorBaseAgent(instrumentingAgents, state) |
67 , m_pageAgent(pageAgent) | 72 , m_pageAgent(pageAgent) |
68 , m_injectedScriptManager(injectedScriptManager) | 73 , m_injectedScriptManager(injectedScriptManager) |
69 , m_frontend(0) | 74 , m_frontend(0) |
70 , m_enabled(false) | 75 , m_enabled(false) |
71 { | 76 { |
72 } | 77 } |
73 | 78 |
74 InspectorCanvasAgent::~InspectorCanvasAgent() | 79 InspectorCanvasAgent::~InspectorCanvasAgent() |
75 { | 80 { |
76 } | 81 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 if (!m_enabled) | 347 if (!m_enabled) |
343 return; | 348 return; |
344 ErrorString error; | 349 ErrorString error; |
345 for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumen
tedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) { | 350 for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumen
tedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) { |
346 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, m
ainWorldScriptState(it->key)); | 351 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, m
ainWorldScriptState(it->key)); |
347 if (!module.hasNoValue()) | 352 if (!module.hasNoValue()) |
348 module.markFrameEnd(); | 353 module.markFrameEnd(); |
349 } | 354 } |
350 } | 355 } |
351 | 356 |
| 357 InspectorCanvasFactory::InspectorCanvasFactory(InstrumentingAgents* instrumentin
gAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFact
ory, InjectedScriptManager* injectedScriptManager) |
| 358 : InspectorBaseFactory<InspectorCanvasFactory, InspectorCanvasAgent>("Canvas
", instrumentingAgents, compositeState) |
| 359 { |
| 360 setAgent(InspectorCanvasAgent::create(m_instrumentingAgents, m_state, pageFa
ctory->agent(), injectedScriptManager)); |
| 361 } |
| 362 |
352 } // namespace WebCore | 363 } // namespace WebCore |
353 | 364 |
OLD | NEW |