Chromium Code Reviews| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 | 56 |
| 57 InjectedScript* injectedScriptFor(v8::Local<v8::Context>); | 57 InjectedScript* injectedScriptFor(v8::Local<v8::Context>); |
| 58 InjectedScript* findInjectedScript(int) const; | 58 InjectedScript* findInjectedScript(int) const; |
| 59 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*) const; | 59 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*) const; |
| 60 void discardInjectedScripts(); | 60 void discardInjectedScripts(); |
| 61 int discardInjectedScriptFor(v8::Local<v8::Context>); | 61 int discardInjectedScriptFor(v8::Local<v8::Context>); |
| 62 void discardInjectedScript(int); | 62 void discardInjectedScript(int); |
| 63 void releaseObjectGroup(const String16& objectGroup); | 63 void releaseObjectGroup(const String16& objectGroup); |
| 64 void setCustomObjectFormatterEnabled(bool); | 64 void setCustomObjectFormatterEnabled(bool); |
| 65 | 65 |
| 66 class InjectScopeExtensionByName { | |
|
dgozman
2016/03/17 19:16:12
ScopedGlobalObjectExtension
kozy
2016/03/17 20:48:56
Done.
| |
| 67 PROTOCOL_DISALLOW_COPY(InjectScopeExtensionByName); | |
| 68 public: | |
| 69 InjectScopeExtensionByName(ErrorString*, InjectedScript*, bool injectToA ll, const String16& name); | |
|
dgozman
2016/03/17 19:16:12
// Pass nullptr to affect all contexts which have
kozy
2016/03/17 20:48:56
Done.
| |
| 70 ~InjectScopeExtensionByName(); | |
| 71 | |
| 72 bool hasError() const { return m_hasError; } | |
| 73 private: | |
| 74 void setOnGlobal(v8::Local<v8::Object> global, v8::Local<v8::Object> sco peExtension); | |
|
dgozman
2016/03/17 19:16:12
scopeExtension -> extension
kozy
2016/03/17 20:48:56
Done.
| |
| 75 | |
| 76 v8::Isolate* m_isolate; | |
| 77 v8::Local<v8::Symbol> m_symbol; | |
| 78 v8::Local<v8::Context> m_context; | |
| 79 v8::Local<v8::Array> m_globals; | |
| 80 bool m_hasError; | |
| 81 }; | |
| 66 private: | 82 private: |
| 67 explicit InjectedScriptManager(V8DebuggerImpl*); | 83 explicit InjectedScriptManager(V8DebuggerImpl*); |
| 68 | 84 |
| 69 v8::Local<v8::Object> createInjectedScript(const String16& source, v8::Local <v8::Context>, int id, InjectedScriptNative*); | 85 v8::Local<v8::Object> createInjectedScript(const String16& source, v8::Local <v8::Context>, int id, InjectedScriptNative*); |
| 70 | 86 |
| 71 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap ; | 87 typedef protocol::HashMap<int, OwnPtr<InjectedScript>> IdToInjectedScriptMap ; |
| 72 IdToInjectedScriptMap m_idToInjectedScript; | 88 IdToInjectedScriptMap m_idToInjectedScript; |
| 73 OwnPtr<InjectedScriptHost> m_injectedScriptHost; | 89 OwnPtr<InjectedScriptHost> m_injectedScriptHost; |
| 74 bool m_customObjectFormatterEnabled; | 90 bool m_customObjectFormatterEnabled; |
| 75 V8DebuggerImpl* m_debugger; | 91 V8DebuggerImpl* m_debugger; |
| 76 }; | 92 }; |
| 77 | 93 |
| 78 } // namespace blink | 94 } // namespace blink |
| 79 | 95 |
| 80 #endif // !defined(InjectedScriptManager_h) | 96 #endif // !defined(InjectedScriptManager_h) |
| OLD | NEW |