| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 void setInjectedScriptSource(const String& source) { m_injectedScriptSource
= source; } | 60 void setInjectedScriptSource(const String& source) { m_injectedScriptSource
= source; } |
| 61 | 61 |
| 62 InspectorController* inspectorController() { return m_inspectorController; } | 62 InspectorController* inspectorController() { return m_inspectorController; } |
| 63 void disconnectController() { m_inspectorController = 0; } | 63 void disconnectController() { m_inspectorController = 0; } |
| 64 | 64 |
| 65 void clearConsoleMessages(); | 65 void clearConsoleMessages(); |
| 66 | 66 |
| 67 void copyText(const String& text); | 67 void copyText(const String& text); |
| 68 Node* nodeForId(long nodeId); | 68 Node* nodeForId(long nodeId); |
| 69 ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup)
; | |
| 70 ScriptValue unwrapObject(const String& objectId); | |
| 71 long pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI); | 69 long pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI); |
| 72 | 70 |
| 73 void addNodesToSearchResult(const String& nodeIds); | 71 void addNodesToSearchResult(const String& nodeIds); |
| 74 long pushNodeByPathToFrontend(const String& path); | 72 long pushNodeByPathToFrontend(const String& path); |
| 75 | 73 |
| 76 #if ENABLE(JAVASCRIPT_DEBUGGER) | 74 #if ENABLE(JAVASCRIPT_DEBUGGER) |
| 77 JavaScriptCallFrame* currentCallFrame() const; | 75 JavaScriptCallFrame* currentCallFrame() const; |
| 78 #endif | 76 #endif |
| 79 #if ENABLE(DATABASE) | 77 #if ENABLE(DATABASE) |
| 80 Database* databaseForId(long databaseId); | 78 Database* databaseForId(long databaseId); |
| 81 void selectDatabase(Database* database); | 79 void selectDatabase(Database* database); |
| 82 #endif | 80 #endif |
| 83 #if ENABLE(DOM_STORAGE) | 81 #if ENABLE(DOM_STORAGE) |
| 84 void selectDOMStorage(Storage* storage); | 82 void selectDOMStorage(Storage* storage); |
| 85 #endif | 83 #endif |
| 86 void reportDidDispatchOnInjectedScript(long callId, const String& result, bo
ol isException); | 84 void reportDidDispatchOnInjectedScript(long callId, const String& result, bo
ol isException); |
| 87 | 85 |
| 88 ScriptObject injectedScriptFor(ScriptState*); | 86 ScriptObject injectedScriptFor(ScriptState*); |
| 89 ScriptObject injectedScriptForId(long); | 87 ScriptObject injectedScriptForId(long); |
| 90 void discardInjectedScripts(); | 88 void discardInjectedScripts(); |
| 89 void releaseWrapperObjectGroup(long injectedScriptId, const String& objectGr
oup); |
| 91 | 90 |
| 92 private: | 91 private: |
| 93 InjectedScriptHost(InspectorController* inspectorController); | 92 InjectedScriptHost(InspectorController* inspectorController); |
| 94 InspectorDOMAgent* inspectorDOMAgent(); | 93 InspectorDOMAgent* inspectorDOMAgent(); |
| 95 InspectorFrontend* inspectorFrontend(); | 94 InspectorFrontend* inspectorFrontend(); |
| 96 | 95 |
| 96 void releaseWrapperObjectGroup(const ScriptObject& injectedScript, const Str
ing& objectGroup); |
| 97 |
| 97 InspectorController* m_inspectorController; | 98 InspectorController* m_inspectorController; |
| 98 String m_injectedScriptSource; | 99 String m_injectedScriptSource; |
| 99 long m_nextInjectedScriptId; | 100 long m_nextInjectedScriptId; |
| 100 typedef HashMap<long, ScriptObject> IdToInjectedScriptMap; | 101 typedef HashMap<long, ScriptObject> IdToInjectedScriptMap; |
| 101 IdToInjectedScriptMap m_idToInjectedScript; | 102 IdToInjectedScriptMap m_idToInjectedScript; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace WebCore | 105 } // namespace WebCore |
| 105 | 106 |
| 106 #endif // !defined(InjectedScriptHost_h) | 107 #endif // !defined(InjectedScriptHost_h) |
| OLD | NEW |