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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h

Issue 1621923002: [DevTools] Remove InspectorState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
index 57e0ec167254d0661e716ef60ab64477a6e638da..ebc9a41b40577c75408dc54713d0adbfc768e9ae 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
@@ -34,6 +34,7 @@
#include "core/CoreExport.h"
#include "core/InspectorBackendDispatcher.h"
#include "core/inspector/InstrumentingAgents.h"
+#include "platform/JSONValues.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/Vector.h"
@@ -42,8 +43,6 @@
namespace blink {
class InspectorFrontend;
-class InspectorCompositeState;
-class InspectorState;
class InstrumentingAgents;
class LocalFrame;
@@ -63,13 +62,14 @@ public:
virtual void discardAgent() { }
virtual void didCommitLoadForLocalFrame(LocalFrame*) { }
virtual void flushPendingProtocolNotifications() { }
+ virtual void setState(PassRefPtr<JSONObject>);
String name() const { return m_name; }
- void appended(InstrumentingAgents*, InspectorState*);
+ void appended(InstrumentingAgents*);
protected:
RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
- InspectorState* m_state;
+ RefPtr<JSONObject> m_state;
private:
String m_name;
@@ -79,22 +79,23 @@ class CORE_EXPORT InspectorAgentRegistry final {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(InspectorAgentRegistry);
public:
- InspectorAgentRegistry(InstrumentingAgents*, InspectorCompositeState*);
+ explicit InspectorAgentRegistry(InstrumentingAgents*);
void append(PassOwnPtrWillBeRawPtr<InspectorAgent>);
void setFrontend(InspectorFrontend*);
void clearFrontend();
- void restore();
+ void restore(const String& savedState);
void registerInDispatcher(InspectorBackendDispatcher*);
void discardAgents();
void flushPendingProtocolNotifications();
void didCommitLoadForLocalFrame(LocalFrame*);
+ String state();
DECLARE_TRACE();
private:
RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
- InspectorCompositeState* m_inspectorState;
+ RefPtr<JSONObject> m_state;
WillBeHeapVector<OwnPtrWillBeMember<InspectorAgent> > m_agents;
};

Powered by Google App Engine
This is Rietveld 408576698