| 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 RefPtrWillBePersistent<InjectedScriptHost> host; | 52 #if ENABLE(OILPAN) |
| 53 WrapperPersistent<InjectedScriptHost>* hostPtr; |
| 54 #else |
| 55 RefPtr<InjectedScriptHost> host; |
| 56 #endif |
| 53 InjectedScriptManager* injectedScriptManager; | 57 InjectedScriptManager* injectedScriptManager; |
| 58 |
| 59 #if ENABLE(OILPAN) |
| 60 CallbackData() : hostPtr(0) { } |
| 61 ~CallbackData(); |
| 62 #endif |
| 54 }; | 63 }; |
| 55 | 64 |
| 56 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); | 65 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); |
| 57 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); | 66 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); |
| 58 ~InjectedScriptManager(); | 67 ~InjectedScriptManager(); |
| 59 void trace(Visitor*); | 68 void trace(Visitor*); |
| 60 | 69 |
| 61 void disconnect(); | 70 void disconnect(); |
| 62 | 71 |
| 63 InjectedScriptHost* injectedScriptHost(); | 72 InjectedScriptHost* injectedScriptHost(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; | 101 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; |
| 93 InspectedStateAccessCheck m_inspectedStateAccessCheck; | 102 InspectedStateAccessCheck m_inspectedStateAccessCheck; |
| 94 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; | 103 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; |
| 95 ScriptStateToId m_scriptStateToId; | 104 ScriptStateToId m_scriptStateToId; |
| 96 HashSet<OwnPtr<CallbackData> > m_callbackDataSet; | 105 HashSet<OwnPtr<CallbackData> > m_callbackDataSet; |
| 97 }; | 106 }; |
| 98 | 107 |
| 99 } // namespace blink | 108 } // namespace blink |
| 100 | 109 |
| 101 #endif // !defined(InjectedScriptManager_h) | 110 #endif // !defined(InjectedScriptManager_h) |
| OLD | NEW |