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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class ScriptValue; | 49 class ScriptValue; |
50 class Storage; | 50 class Storage; |
51 | 51 |
52 struct EventListenerInfo; | 52 struct EventListenerInfo; |
53 | 53 |
54 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by
the inspector, | 54 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by
the inspector, |
55 // a reference to the InjectedScriptHost may be leaked to the page being inspect
ed. Thus, the | 55 // a reference to the InjectedScriptHost may be leaked to the page being inspect
ed. Thus, the |
56 // InjectedScriptHost must never implemment methods that have more power over th
e page than the | 56 // InjectedScriptHost must never implemment methods that have more power over th
e page than the |
57 // page already has itself (e.g. origin restriction bypasses). | 57 // page already has itself (e.g. origin restriction bypasses). |
58 | 58 |
59 class InjectedScriptHost : public RefCounted<InjectedScriptHost>, public ScriptW
rappable { | 59 class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<Inje
ctedScriptHost>, public ScriptWrappable { |
60 public: | 60 public: |
61 static PassRefPtr<InjectedScriptHost> create(); | 61 static PassRefPtrWillBeRawPtr<InjectedScriptHost> create(); |
62 ~InjectedScriptHost(); | 62 ~InjectedScriptHost(); |
| 63 void trace(Visitor*); |
63 | 64 |
64 void init(InstrumentingAgents* instrumentingAgents, ScriptDebugServer* scrip
tDebugServer) | 65 void init(InstrumentingAgents* instrumentingAgents, ScriptDebugServer* scrip
tDebugServer) |
65 { | 66 { |
66 m_instrumentingAgents = instrumentingAgents; | 67 m_instrumentingAgents = instrumentingAgents; |
67 m_scriptDebugServer = scriptDebugServer; | 68 m_scriptDebugServer = scriptDebugServer; |
68 } | 69 } |
69 | 70 |
70 static Node* scriptValueAsNode(ScriptState*, ScriptValue); | 71 static Node* scriptValueAsNode(ScriptState*, ScriptValue); |
71 static ScriptValue nodeAsScriptValue(ScriptState*, Node*); | 72 static ScriptValue nodeAsScriptValue(ScriptState*, Node*); |
72 | 73 |
(...skipping 16 matching lines...) Expand all Loading... |
89 void debugFunction(const String& scriptId, int lineNumber, int columnNumber)
; | 90 void debugFunction(const String& scriptId, int lineNumber, int columnNumber)
; |
90 void undebugFunction(const String& scriptId, int lineNumber, int columnNumbe
r); | 91 void undebugFunction(const String& scriptId, int lineNumber, int columnNumbe
r); |
91 void monitorFunction(const String& scriptId, int lineNumber, int columnNumbe
r, const String& functionName); | 92 void monitorFunction(const String& scriptId, int lineNumber, int columnNumbe
r, const String& functionName); |
92 void unmonitorFunction(const String& scriptId, int lineNumber, int columnNum
ber); | 93 void unmonitorFunction(const String& scriptId, int lineNumber, int columnNum
ber); |
93 | 94 |
94 ScriptDebugServer& scriptDebugServer() { return *m_scriptDebugServer; } | 95 ScriptDebugServer& scriptDebugServer() { return *m_scriptDebugServer; } |
95 | 96 |
96 private: | 97 private: |
97 InjectedScriptHost(); | 98 InjectedScriptHost(); |
98 | 99 |
99 InstrumentingAgents* m_instrumentingAgents; | 100 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; |
100 ScriptDebugServer* m_scriptDebugServer; | 101 ScriptDebugServer* m_scriptDebugServer; |
101 Vector<OwnPtr<InspectableObject> > m_inspectedObjects; | 102 Vector<OwnPtr<InspectableObject> > m_inspectedObjects; |
102 OwnPtr<InspectableObject> m_defaultInspectableObject; | 103 OwnPtr<InspectableObject> m_defaultInspectableObject; |
103 }; | 104 }; |
104 | 105 |
105 } // namespace WebCore | 106 } // namespace WebCore |
106 | 107 |
107 #endif // !defined(InjectedScriptHost_h) | 108 #endif // !defined(InjectedScriptHost_h) |
OLD | NEW |