Chromium Code Reviews| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 class InjectedScriptCanvasModule; | 47 class InjectedScriptCanvasModule; |
| 48 class InjectedScriptManager; | 48 class InjectedScriptManager; |
| 49 class InspectorPageAgent; | 49 class InspectorPageAgent; |
| 50 class InstrumentingAgents; | 50 class InstrumentingAgents; |
| 51 class ScriptValue; | 51 class ScriptValue; |
| 52 | 52 |
| 53 typedef String ErrorString; | 53 typedef String ErrorString; |
| 54 | 54 |
| 55 class InspectorCanvasAgent FINAL : public InspectorBaseAgent<InspectorCanvasAgen t>, public InspectorBackendDispatcher::CanvasCommandHandler { | 55 class InspectorCanvasAgent FINAL : public InspectorBaseAgent<InspectorCanvasAgen t>, public InspectorBackendDispatcher::CanvasCommandHandler { |
| 56 public: | 56 public: |
| 57 static PassOwnPtr<InspectorCanvasAgent> create(InspectorPageAgent* pageAgent , InjectedScriptManager* injectedScriptManager) | 57 static PassOwnPtrWillBeRawPtr<InspectorCanvasAgent> create(InspectorPageAgen t* pageAgent, InjectedScriptManager* injectedScriptManager) |
| 58 { | 58 { |
| 59 return adoptPtr(new InspectorCanvasAgent(pageAgent, injectedScriptManage r)); | 59 return adoptPtrWillBeNoop(new InspectorCanvasAgent(pageAgent, injectedSc riptManager)); |
| 60 } | 60 } |
| 61 virtual ~InspectorCanvasAgent(); | 61 virtual ~InspectorCanvasAgent(); |
| 62 virtual void trace(Visitor*) OVERRIDE; | |
| 62 | 63 |
| 63 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 64 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| 64 virtual void clearFrontend() OVERRIDE; | 65 virtual void clearFrontend() OVERRIDE; |
| 65 virtual void restore() OVERRIDE; | 66 virtual void restore() OVERRIDE; |
| 66 | 67 |
| 67 void didCommitLoad(LocalFrame*, DocumentLoader*); | 68 void didCommitLoad(LocalFrame*, DocumentLoader*); |
| 68 void frameDetachedFromParent(LocalFrame*); | 69 void frameDetachedFromParent(LocalFrame*); |
| 69 void didBeginFrame(); | 70 void didBeginFrame(); |
| 70 | 71 |
| 71 // Called from InspectorCanvasInstrumentation. | 72 // Called from InspectorCanvasInstrumentation. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 89 InspectorCanvasAgent(InspectorPageAgent*, InjectedScriptManager*); | 90 InspectorCanvasAgent(InspectorPageAgent*, InjectedScriptManager*); |
| 90 | 91 |
| 91 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, ScriptSt ate*); | 92 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, ScriptSt ate*); |
| 92 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const Sc riptValue&); | 93 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const Sc riptValue&); |
| 93 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const St ring&); | 94 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const St ring&); |
| 94 | 95 |
| 95 void findFramesWithUninstrumentedCanvases(); | 96 void findFramesWithUninstrumentedCanvases(); |
| 96 bool checkIsEnabled(ErrorString*) const; | 97 bool checkIsEnabled(ErrorString*) const; |
| 97 ScriptValue notifyRenderingContextWasWrapped(const ScriptValue&); | 98 ScriptValue notifyRenderingContextWasWrapped(const ScriptValue&); |
| 98 | 99 |
| 99 InspectorPageAgent* m_pageAgent; | 100 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 100 InjectedScriptManager* m_injectedScriptManager; | 101 InjectedScriptManager* m_injectedScriptManager; |
|
haraken
2014/06/11 06:09:48
Raw pointers back to InjectedScriptManager look sa
| |
| 101 InspectorFrontend::Canvas* m_frontend; | 102 InspectorFrontend::Canvas* m_frontend; |
| 102 bool m_enabled; | 103 bool m_enabled; |
| 103 // Contains all frames with canvases, value is true only for frames that hav e an uninstrumented canvas. | 104 // Contains all frames with canvases, value is true only for frames that hav e an uninstrumented canvas. |
| 104 typedef HashMap<LocalFrame*, bool> FramesWithUninstrumentedCanvases; | 105 typedef HashMap<LocalFrame*, bool> FramesWithUninstrumentedCanvases; |
|
haraken
2014/06/11 06:09:48
This raw pointer looks safe since it's explicitly
| |
| 105 FramesWithUninstrumentedCanvases m_framesWithUninstrumentedCanvases; | 106 FramesWithUninstrumentedCanvases m_framesWithUninstrumentedCanvases; |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace WebCore | 109 } // namespace WebCore |
| 109 | 110 |
| 110 | 111 |
| 111 #endif // !defined(InspectorCanvasAgent_h) | 112 #endif // !defined(InspectorCanvasAgent_h) |
| OLD | NEW |