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) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 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 25 matching lines...) Expand all Loading... |
36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
37 #include <v8.h> | 37 #include <v8.h> |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class DOMWindow; | 41 class DOMWindow; |
42 class InjectedScript; | 42 class InjectedScript; |
43 class InjectedScriptHost; | 43 class InjectedScriptHost; |
44 class ScriptValue; | 44 class ScriptValue; |
45 | 45 |
46 class InjectedScriptManager { | 46 class InjectedScriptManager : public NoBaseWillBeGarbageCollectedFinalized<Injec
tedScriptManager> { |
47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager); WTF_MAKE_FAST_ALLOCATED; | 47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager); |
| 48 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
48 public: | 49 public: |
49 static PassOwnPtr<InjectedScriptManager> createForPage(); | 50 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); |
50 static PassOwnPtr<InjectedScriptManager> createForWorker(); | 51 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); |
51 ~InjectedScriptManager(); | 52 ~InjectedScriptManager(); |
| 53 void trace(Visitor*); |
52 | 54 |
53 void disconnect(); | 55 void disconnect(); |
54 | 56 |
55 InjectedScriptHost* injectedScriptHost(); | 57 InjectedScriptHost* injectedScriptHost(); |
56 | 58 |
57 InjectedScript injectedScriptFor(ScriptState*); | 59 InjectedScript injectedScriptFor(ScriptState*); |
58 InjectedScript injectedScriptForId(int); | 60 InjectedScript injectedScriptForId(int); |
59 int injectedScriptIdFor(ScriptState*); | 61 int injectedScriptIdFor(ScriptState*); |
60 InjectedScript injectedScriptForObjectId(const String& objectId); | 62 InjectedScript injectedScriptForObjectId(const String& objectId); |
61 void discardInjectedScripts(); | 63 void discardInjectedScripts(); |
(...skipping 10 matching lines...) Expand all Loading... |
72 | 74 |
73 String injectedScriptSource(); | 75 String injectedScriptSource(); |
74 ScriptValue createInjectedScript(const String& source, ScriptState*, int id)
; | 76 ScriptValue createInjectedScript(const String& source, ScriptState*, int id)
; |
75 | 77 |
76 static bool canAccessInspectedWindow(ScriptState*); | 78 static bool canAccessInspectedWindow(ScriptState*); |
77 static bool canAccessInspectedWorkerGlobalScope(ScriptState*); | 79 static bool canAccessInspectedWorkerGlobalScope(ScriptState*); |
78 | 80 |
79 int m_nextInjectedScriptId; | 81 int m_nextInjectedScriptId; |
80 typedef HashMap<int, InjectedScript> IdToInjectedScriptMap; | 82 typedef HashMap<int, InjectedScript> IdToInjectedScriptMap; |
81 IdToInjectedScriptMap m_idToInjectedScript; | 83 IdToInjectedScriptMap m_idToInjectedScript; |
82 RefPtrWillBePersistent<InjectedScriptHost> m_injectedScriptHost; | 84 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; |
83 InspectedStateAccessCheck m_inspectedStateAccessCheck; | 85 InspectedStateAccessCheck m_inspectedStateAccessCheck; |
84 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; | 86 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; |
85 ScriptStateToId m_scriptStateToId; | 87 ScriptStateToId m_scriptStateToId; |
86 }; | 88 }; |
87 | 89 |
88 } // namespace WebCore | 90 } // namespace WebCore |
89 | 91 |
90 #endif // !defined(InjectedScriptManager_h) | 92 #endif // !defined(InjectedScriptManager_h) |
OLD | NEW |