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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class V8DebuggerClient; | 44 class V8DebuggerClient; |
45 class V8DebuggerImpl; | 45 class V8DebuggerImpl; |
46 | 46 |
47 class InjectedScriptManager { | 47 class InjectedScriptManager { |
48 PROTOCOL_DISALLOW_COPY(InjectedScriptManager); | 48 PROTOCOL_DISALLOW_COPY(InjectedScriptManager); |
49 public: | 49 public: |
50 static PassOwnPtr<InjectedScriptManager> create(V8DebuggerImpl*); | 50 static PassOwnPtr<InjectedScriptManager> create(V8DebuggerImpl*); |
51 ~InjectedScriptManager(); | 51 ~InjectedScriptManager(); |
52 | 52 |
53 InjectedScriptHost* injectedScriptHost(); | 53 InjectedScriptHost* injectedScriptHost(); |
54 V8DebuggerImpl* debugger() { return m_debugger; } | |
55 | 54 |
56 InjectedScript* injectedScriptFor(v8::Local<v8::Context>); | 55 InjectedScript* injectedScriptFor(v8::Local<v8::Context>); |
57 InjectedScript* findInjectedScript(int) const; | 56 InjectedScript* findInjectedScript(int) const; |
58 InjectedScript* findInjectedScript(RemoteObjectIdBase*) const; | 57 InjectedScript* findInjectedScript(RemoteObjectIdBase*) const; |
59 void discardInjectedScripts(); | 58 void discardInjectedScripts(); |
60 int discardInjectedScriptFor(v8::Local<v8::Context>); | 59 int discardInjectedScriptFor(v8::Local<v8::Context>); |
61 void discardInjectedScript(int); | 60 void discardInjectedScript(int); |
62 void releaseObjectGroup(const String16& objectGroup); | 61 void releaseObjectGroup(const String16& objectGroup); |
63 void setCustomObjectFormatterEnabled(bool); | 62 void setCustomObjectFormatterEnabled(bool); |
64 | 63 |
65 private: | 64 private: |
66 explicit InjectedScriptManager(V8DebuggerImpl*); | 65 explicit InjectedScriptManager(V8DebuggerImpl*); |
67 | 66 |
68 v8::Local<v8::Object> createInjectedScript(const String16& source, v8::Local
<v8::Context>, int id, InjectedScriptNative*); | 67 v8::Local<v8::Object> createInjectedScript(const String16& source, v8::Local
<v8::Context>, int id, InjectedScriptNative*); |
69 | 68 |
70 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap
; | 69 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap
; |
71 IdToInjectedScriptMap m_idToInjectedScript; | 70 IdToInjectedScriptMap m_idToInjectedScript; |
72 OwnPtr<InjectedScriptHost> m_injectedScriptHost; | 71 OwnPtr<InjectedScriptHost> m_injectedScriptHost; |
73 bool m_customObjectFormatterEnabled; | 72 bool m_customObjectFormatterEnabled; |
74 V8DebuggerImpl* m_debugger; | 73 V8DebuggerClient* m_client; |
75 }; | 74 }; |
76 | 75 |
77 } // namespace blink | 76 } // namespace blink |
78 | 77 |
79 #endif // !defined(InjectedScriptManager_h) | 78 #endif // !defined(InjectedScriptManager_h) |
OLD | NEW |