| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class InjectedScript; | 42 class InjectedScript; |
| 43 class InjectedScriptHost; | 43 class InjectedScriptHost; |
| 44 class ScriptValue; | 44 class ScriptValue; |
| 45 | 45 |
| 46 class InjectedScriptManager : public NoBaseWillBeGarbageCollectedFinalized<Injec
tedScriptManager> { | 46 class InjectedScriptManager : public NoBaseWillBeGarbageCollectedFinalized<Injec
tedScriptManager> { |
| 47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager); | 47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager); |
| 48 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 48 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 49 public: | 49 public: |
| 50 struct CallbackData { | 50 struct CallbackData { |
| 51 ScopedPersistent<v8::Object> handle; | 51 ScopedPersistent<v8::Object> handle; |
| 52 #if ENABLE(OILPAN) | 52 RefPtrWillBePersistent<InjectedScriptHost> host; |
| 53 WrapperPersistent<InjectedScriptHost>* hostPtr; | |
| 54 #else | |
| 55 RefPtr<InjectedScriptHost> host; | |
| 56 #endif | |
| 57 InjectedScriptManager* injectedScriptManager; | 53 InjectedScriptManager* injectedScriptManager; |
| 58 | |
| 59 #if ENABLE(OILPAN) | |
| 60 CallbackData() : hostPtr(0) { } | |
| 61 ~CallbackData(); | |
| 62 #endif | |
| 63 }; | 54 }; |
| 64 | 55 |
| 65 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); | 56 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); |
| 66 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); | 57 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); |
| 67 ~InjectedScriptManager(); | 58 ~InjectedScriptManager(); |
| 68 void trace(Visitor*); | 59 void trace(Visitor*); |
| 69 | 60 |
| 70 void disconnect(); | 61 void disconnect(); |
| 71 | 62 |
| 72 InjectedScriptHost* injectedScriptHost(); | 63 InjectedScriptHost* injectedScriptHost(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 101 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; | 92 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; |
| 102 InspectedStateAccessCheck m_inspectedStateAccessCheck; | 93 InspectedStateAccessCheck m_inspectedStateAccessCheck; |
| 103 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; | 94 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; |
| 104 ScriptStateToId m_scriptStateToId; | 95 ScriptStateToId m_scriptStateToId; |
| 105 HashSet<OwnPtr<CallbackData> > m_callbackDataSet; | 96 HashSet<OwnPtr<CallbackData> > m_callbackDataSet; |
| 106 }; | 97 }; |
| 107 | 98 |
| 108 } // namespace blink | 99 } // namespace blink |
| 109 | 100 |
| 110 #endif // !defined(InjectedScriptManager_h) | 101 #endif // !defined(InjectedScriptManager_h) |
| OLD | NEW |