| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // page already has itself (e.g. origin restriction bypasses). | 58 // page already has itself (e.g. origin restriction bypasses). |
| 59 | 59 |
| 60 class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<Inje
ctedScriptHost> { | 60 class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<Inje
ctedScriptHost> { |
| 61 public: | 61 public: |
| 62 static PassRefPtrWillBeRawPtr<InjectedScriptHost> create(); | 62 static PassRefPtrWillBeRawPtr<InjectedScriptHost> create(); |
| 63 ~InjectedScriptHost(); | 63 ~InjectedScriptHost(); |
| 64 DECLARE_TRACE(); | 64 DECLARE_TRACE(); |
| 65 | 65 |
| 66 using InspectCallback = Function<void(PassRefPtr<TypeBuilder::Runtime::Remot
eObject>, PassRefPtr<JSONObject>)>; | 66 using InspectCallback = Function<void(PassRefPtr<TypeBuilder::Runtime::Remot
eObject>, PassRefPtr<JSONObject>)>; |
| 67 | 67 |
| 68 void init(InspectorConsoleAgent* consoleAgent, V8DebuggerAgent* debuggerAgen
t, PassOwnPtr<InspectCallback> inspectCallback, V8Debugger* debugger, PassOwnPtr
<InjectedScriptHostClient> injectedScriptHostClient) | 68 void init(InspectorConsoleAgent*, V8DebuggerAgent*, PassOwnPtr<InspectCallba
ck>, V8Debugger*, PassOwnPtr<InjectedScriptHostClient>); |
| 69 { | |
| 70 m_consoleAgent = consoleAgent; | |
| 71 m_debuggerAgent = debuggerAgent; | |
| 72 m_inspectCallback = inspectCallback; | |
| 73 m_debugger = debugger; | |
| 74 m_client = injectedScriptHostClient; | |
| 75 } | |
| 76 | 69 |
| 77 static EventTarget* eventTargetFromV8Value(v8::Isolate*, v8::Local<v8::Value
>); | 70 static EventTarget* eventTargetFromV8Value(v8::Isolate*, v8::Local<v8::Value
>); |
| 78 | 71 |
| 79 void disconnect(); | 72 void disconnect(); |
| 80 | 73 |
| 81 class InspectableObject : public NoBaseWillBeGarbageCollectedFinalized<Inspe
ctableObject> { | 74 class InspectableObject : public NoBaseWillBeGarbageCollectedFinalized<Inspe
ctableObject> { |
| 82 USING_FAST_MALLOC_WILL_BE_REMOVED(InspectableObject); | 75 USING_FAST_MALLOC_WILL_BE_REMOVED(InspectableObject); |
| 83 public: | 76 public: |
| 84 virtual ScriptValue get(ScriptState*); | 77 virtual ScriptValue get(ScriptState*); |
| 85 virtual ~InspectableObject() { } | 78 virtual ~InspectableObject() { } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 114 V8Debugger* m_debugger; | 107 V8Debugger* m_debugger; |
| 115 WillBeHeapVector<OwnPtrWillBeMember<InspectableObject>> m_inspectedObjects; | 108 WillBeHeapVector<OwnPtrWillBeMember<InspectableObject>> m_inspectedObjects; |
| 116 OwnPtrWillBeMember<InspectableObject> m_defaultInspectableObject; | 109 OwnPtrWillBeMember<InspectableObject> m_defaultInspectableObject; |
| 117 OwnPtr<InjectedScriptHostClient> m_client; | 110 OwnPtr<InjectedScriptHostClient> m_client; |
| 118 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; | 111 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; |
| 119 }; | 112 }; |
| 120 | 113 |
| 121 } // namespace blink | 114 } // namespace blink |
| 122 | 115 |
| 123 #endif // InjectedScriptHost_h | 116 #endif // InjectedScriptHost_h |
| OLD | NEW |