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

Side by Side Diff: Source/core/inspector/InspectorBaseAgent.h

Issue 323043002: Oilpan: Prepare moving InspectorAgent related classes to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 virtual void registerInDispatcher(InspectorBackendDispatcher*) = 0; 58 virtual void registerInDispatcher(InspectorBackendDispatcher*) = 0;
59 virtual void discardAgent() { } 59 virtual void discardAgent() { }
60 virtual void didCommitLoadForMainFrame() { } 60 virtual void didCommitLoadForMainFrame() { }
61 virtual void flushPendingFrontendMessages() { } 61 virtual void flushPendingFrontendMessages() { }
62 62
63 String name() { return m_name; } 63 String name() { return m_name; }
64 void appended(InstrumentingAgents*, InspectorState*); 64 void appended(InstrumentingAgents*, InspectorState*);
65 65
66 protected: 66 protected:
67 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; 67 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
68 // FIXME: Oilpan: Move InspectorState to heap in follow-up CL. 68 RawPtrWillBeMember<InspectorState> m_state;
69 InspectorState* m_state;
70 69
71 private: 70 private:
72 String m_name; 71 String m_name;
73 }; 72 };
74 73
75 class InspectorAgentRegistry FINAL { 74 class InspectorAgentRegistry FINAL {
76 DISALLOW_ALLOCATION(); 75 DISALLOW_ALLOCATION();
77 public: 76 public:
78 InspectorAgentRegistry(InstrumentingAgents*, InspectorCompositeState*); 77 InspectorAgentRegistry(InstrumentingAgents*, InspectorCompositeState*);
79 void append(PassOwnPtrWillBeRawPtr<InspectorAgent>); 78 void append(PassOwnPtrWillBeRawPtr<InspectorAgent>);
80 79
81 void setFrontend(InspectorFrontend*); 80 void setFrontend(InspectorFrontend*);
82 void clearFrontend(); 81 void clearFrontend();
83 void restore(); 82 void restore();
84 void registerInDispatcher(InspectorBackendDispatcher*); 83 void registerInDispatcher(InspectorBackendDispatcher*);
85 void discardAgents(); 84 void discardAgents();
86 void flushPendingFrontendMessages(); 85 void flushPendingFrontendMessages();
87 void didCommitLoadForMainFrame(); 86 void didCommitLoadForMainFrame();
88 87
89 void trace(Visitor*); 88 void trace(Visitor*);
90 89
91 private: 90 private:
92 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; 91 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
93 // FIXME: Oilpan: Move InspectorCompositeState to heap in follow-up CL. 92 RawPtrWillBeMember<InspectorCompositeState> m_inspectorState;
94 InspectorCompositeState* m_inspectorState;
95 WillBeHeapVector<OwnPtrWillBeMember<InspectorAgent> > m_agents; 93 WillBeHeapVector<OwnPtrWillBeMember<InspectorAgent> > m_agents;
96 }; 94 };
97 95
98 template<typename T> 96 template<typename T>
99 class InspectorBaseAgent : public InspectorAgent { 97 class InspectorBaseAgent : public InspectorAgent {
100 public: 98 public:
101 virtual ~InspectorBaseAgent() { } 99 virtual ~InspectorBaseAgent() { }
102 100
103 virtual void registerInDispatcher(InspectorBackendDispatcher* dispatcher) OV ERRIDE FINAL 101 virtual void registerInDispatcher(InspectorBackendDispatcher* dispatcher) OV ERRIDE FINAL
104 { 102 {
105 dispatcher->registerAgent(static_cast<T*>(this)); 103 dispatcher->registerAgent(static_cast<T*>(this));
106 } 104 }
107 105
108 protected: 106 protected:
109 explicit InspectorBaseAgent(const String& name) : InspectorAgent(name) 107 explicit InspectorBaseAgent(const String& name) : InspectorAgent(name)
110 { 108 {
111 } 109 }
112 }; 110 };
113 111
114 } // namespace blink 112 } // namespace blink
115 113
116 #endif // !defined(InspectorBaseAgent_h) 114 #endif // !defined(InspectorBaseAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptManager.cpp ('k') | Source/core/inspector/InspectorBaseAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698