| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |