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

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

Issue 1085033003: Introduce InspectorIdentifiers<> and use it to assign/lookup LocalFrame and DocumentLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win build error fixed Created 5 years, 8 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void setShowViewportSizeOnResize(ErrorString*, bool show, const bool* showGr id) override; 100 void setShowViewportSizeOnResize(ErrorString*, bool show, const bool* showGr id) override;
101 void setOverlayMessage(ErrorString*, const String*) override; 101 void setOverlayMessage(ErrorString*, const String*) override;
102 102
103 // InspectorInstrumentation API 103 // InspectorInstrumentation API
104 void didClearDocumentOfWindowObject(LocalFrame*); 104 void didClearDocumentOfWindowObject(LocalFrame*);
105 void domContentLoadedEventFired(LocalFrame*); 105 void domContentLoadedEventFired(LocalFrame*);
106 void loadEventFired(LocalFrame*); 106 void loadEventFired(LocalFrame*);
107 void didCommitLoad(LocalFrame*, DocumentLoader*); 107 void didCommitLoad(LocalFrame*, DocumentLoader*);
108 void frameAttachedToParent(LocalFrame*); 108 void frameAttachedToParent(LocalFrame*);
109 void frameDetachedFromParent(LocalFrame*); 109 void frameDetachedFromParent(LocalFrame*);
110 void loaderDetachedFromFrame(DocumentLoader*);
111 void frameStartedLoading(LocalFrame*); 110 void frameStartedLoading(LocalFrame*);
112 void frameStoppedLoading(LocalFrame*); 111 void frameStoppedLoading(LocalFrame*);
113 void frameScheduledNavigation(LocalFrame*, double delay); 112 void frameScheduledNavigation(LocalFrame*, double delay);
114 void frameClearedScheduledNavigation(LocalFrame*); 113 void frameClearedScheduledNavigation(LocalFrame*);
115 void willRunJavaScriptDialog(const String& message); 114 void willRunJavaScriptDialog(const String& message);
116 void didRunJavaScriptDialog(); 115 void didRunJavaScriptDialog();
117 void didLayout(); 116 void didLayout();
118 void didScroll(); 117 void didScroll();
119 void didResizeMainFrame(); 118 void didResizeMainFrame();
120 void didRecalculateStyle(int); 119 void didRecalculateStyle(int);
121 120
122 // Inspector Controller API 121 // Inspector Controller API
123 void disable(ErrorString*) override; 122 void disable(ErrorString*) override;
124 void restore() override; 123 void restore() override;
125 void discardAgent() override; 124 void discardAgent() override;
126 125
127 // Cross-agents API 126 // Cross-agents API
127 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*);
128 LocalFrame* frameForId(const String& frameId);
129 LocalFrame* assertFrame(ErrorString*, const String& frameId);
128 FrameHost* frameHost(); 130 FrameHost* frameHost();
129 LocalFrame* inspectedFrame() const { return m_inspectedFrame.get(); } 131 LocalFrame* inspectedFrame() const { return m_inspectedFrame.get(); }
130 String createIdentifier();
131 LocalFrame* frameForId(const String& frameId);
132 String frameId(LocalFrame*);
133 bool hasIdForFrame(LocalFrame*) const;
134 String loaderId(DocumentLoader*);
135 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString); 132 LocalFrame* findFrameWithSecurityOrigin(const String& originRawString);
136 LocalFrame* assertFrame(ErrorString*, const String& frameId);
137 bool screencastEnabled(); 133 bool screencastEnabled();
138 static DocumentLoader* assertDocumentLoader(ErrorString*, LocalFrame*);
139 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector ResourceContentLoader.get(); } 134 InspectorResourceContentLoader* resourceContentLoader() { return m_inspector ResourceContentLoader.get(); }
140 135
141 DECLARE_VIRTUAL_TRACE(); 136 DECLARE_VIRTUAL_TRACE();
142 137
143 private: 138 private:
144 class GetResourceContentLoadListener; 139 class GetResourceContentLoadListener;
145 140
146 InspectorPageAgent(LocalFrame* inspectedFrame, InspectorOverlay*); 141 InspectorPageAgent(LocalFrame* inspectedFrame, InspectorOverlay*);
147 142
148 void finishReload(); 143 void finishReload();
149 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co nst String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallback>); 144 void getResourceContentAfterResourcesContentLoaded(const String& frameId, co nst String& url, PassRefPtrWillBeRawPtr<GetResourceContentCallback>);
150 145
151 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result); 146 static bool dataContent(const char* data, unsigned size, const String& textE ncodingName, bool withBase64Encode, String* result);
152 147
153 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*); 148 PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(LocalFrame*);
154 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc alFrame*); 149 PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Loc alFrame*);
155 RawPtrWillBeMember<LocalFrame> m_inspectedFrame; 150 RawPtrWillBeMember<LocalFrame> m_inspectedFrame;
156 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; 151 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent;
157 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent; 152 RawPtrWillBeMember<InspectorCSSAgent> m_cssAgent;
158 RawPtrWillBeMember<InspectorOverlay> m_overlay; 153 RawPtrWillBeMember<InspectorOverlay> m_overlay;
159 long m_lastScriptIdentifier; 154 long m_lastScriptIdentifier;
160 String m_pendingScriptToEvaluateOnLoadOnce; 155 String m_pendingScriptToEvaluateOnLoadOnce;
161 String m_scriptToEvaluateOnLoadOnce; 156 String m_scriptToEvaluateOnLoadOnce;
162 HashMap<LocalFrame*, String> m_frameToIdentifier;
163 HashMap<String, LocalFrame*> m_identifierToFrame;
164 HashMap<DocumentLoader*, String> m_loaderToIdentifier;
165 bool m_enabled; 157 bool m_enabled;
166 bool m_reloading; 158 bool m_reloading;
167 159
168 OwnPtrWillBeMember<InspectorResourceContentLoader> m_inspectorResourceConten tLoader; 160 OwnPtrWillBeMember<InspectorResourceContentLoader> m_inspectorResourceConten tLoader;
169 }; 161 };
170 162
171 163
172 } // namespace blink 164 } // namespace blink
173 165
174 166
175 #endif // !defined(InspectorPagerAgent_h) 167 #endif // !defined(InspectorPagerAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.idl ('k') | Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698