| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class JSONArray; | 44 class JSONArray; |
| 45 class ScriptState; | 45 class ScriptState; |
| 46 class ScriptDebugServer; | 46 class ScriptDebugServer; |
| 47 | 47 |
| 48 typedef String ErrorString; | 48 typedef String ErrorString; |
| 49 | 49 |
| 50 class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent>,
public InspectorBackendDispatcher::RuntimeCommandHandler { | 50 class InspectorRuntimeAgent : public InspectorBaseAgent<InspectorRuntimeAgent>,
public InspectorBackendDispatcher::RuntimeCommandHandler { |
| 51 WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent); | 51 WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent); |
| 52 public: | 52 public: |
| 53 virtual ~InspectorRuntimeAgent(); | 53 virtual ~InspectorRuntimeAgent(); |
| 54 virtual void trace(Visitor*) OVERRIDE; | 54 virtual void trace(Visitor*) override; |
| 55 | 55 |
| 56 // Part of the protocol. | 56 // Part of the protocol. |
| 57 virtual void enable(ErrorString*) OVERRIDE; | 57 virtual void enable(ErrorString*) override; |
| 58 virtual void disable(ErrorString*) OVERRIDE FINAL; | 58 virtual void disable(ErrorString*) override final; |
| 59 virtual void evaluate(ErrorString*, | 59 virtual void evaluate(ErrorString*, |
| 60 const String& expression, | 60 const String& expression, |
| 61 const String* objectGroup, | 61 const String* objectGroup, |
| 62 const bool* includeCommandLineAPI, | 62 const bool* includeCommandLineAPI, |
| 63 const bool* doNotPauseOnExceptionsAndMuteConsole, | 63 const bool* doNotPauseOnExceptionsAndMuteConsole, |
| 64 const int* executionContextId, | 64 const int* executionContextId, |
| 65 const bool* returnByValue, | 65 const bool* returnByValue, |
| 66 const bool* generatePreview, | 66 const bool* generatePreview, |
| 67 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, | 67 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, |
| 68 TypeBuilder::OptOutput<bool>* wasThrown, | 68 TypeBuilder::OptOutput<bool>* wasThrown, |
| 69 RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) OVERRIDE FINAL; | 69 RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) override final; |
| 70 virtual void callFunctionOn(ErrorString*, | 70 virtual void callFunctionOn(ErrorString*, |
| 71 const String& objectId, | 71 const String& objectId, |
| 72 const String& expression, | 72 const String& expression, |
| 73 const RefPtr<JSONArray>* optionalArguments, | 73 const RefPtr<JSONArray>* optionalArguments, |
| 74 const bool* doNotPauseOnExceptionsAndMuteConsole, | 74 const bool* doNotPauseOnExceptionsAndMuteConsole, |
| 75 const bool* returnByValue, | 75 const bool* returnByValue, |
| 76 const bool* generatePreview, | 76 const bool* generatePreview, |
| 77 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, | 77 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, |
| 78 TypeBuilder::OptOutput<bool>* wasThrown) OVERRIDE FINAL; | 78 TypeBuilder::OptOutput<bool>* wasThrown) override final; |
| 79 virtual void releaseObject(ErrorString*, const String& objectId) OVERRIDE FI
NAL; | 79 virtual void releaseObject(ErrorString*, const String& objectId) override fi
nal; |
| 80 virtual void getProperties(ErrorString*, const String& objectId, const bool*
ownProperties, const bool* accessorPropertiesOnly, RefPtr<TypeBuilder::Array<Ty
peBuilder::Runtime::PropertyDescriptor> >& result, RefPtr<TypeBuilder::Array<Typ
eBuilder::Runtime::InternalPropertyDescriptor> >& internalProperties) OVERRIDE F
INAL; | 80 virtual void getProperties(ErrorString*, const String& objectId, const bool*
ownProperties, const bool* accessorPropertiesOnly, RefPtr<TypeBuilder::Array<Ty
peBuilder::Runtime::PropertyDescriptor> >& result, RefPtr<TypeBuilder::Array<Typ
eBuilder::Runtime::InternalPropertyDescriptor> >& internalProperties) override f
inal; |
| 81 virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) OVE
RRIDE FINAL; | 81 virtual void releaseObjectGroup(ErrorString*, const String& objectGroup) ove
rride final; |
| 82 virtual void run(ErrorString*) OVERRIDE; | 82 virtual void run(ErrorString*) override; |
| 83 virtual void isRunRequired(ErrorString*, bool* out_result) OVERRIDE; | 83 virtual void isRunRequired(ErrorString*, bool* out_result) override; |
| 84 | 84 |
| 85 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 85 virtual void setFrontend(InspectorFrontend*) override final; |
| 86 virtual void clearFrontend() OVERRIDE FINAL; | 86 virtual void clearFrontend() override final; |
| 87 virtual void restore() OVERRIDE FINAL; | 87 virtual void restore() override final; |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 InspectorRuntimeAgent(InjectedScriptManager*, ScriptDebugServer*); | 90 InspectorRuntimeAgent(InjectedScriptManager*, ScriptDebugServer*); |
| 91 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 91 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; |
| 92 | 92 |
| 93 virtual void muteConsole() = 0; | 93 virtual void muteConsole() = 0; |
| 94 virtual void unmuteConsole() = 0; | 94 virtual void unmuteConsole() = 0; |
| 95 | 95 |
| 96 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 96 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
| 97 void addExecutionContextToFrontend(ScriptState*, bool isPageContext, const S
tring& origin, const String& frameId); | 97 void addExecutionContextToFrontend(ScriptState*, bool isPageContext, const S
tring& origin, const String& frameId); |
| 98 | 98 |
| 99 bool m_enabled; | 99 bool m_enabled; |
| 100 InspectorFrontend::Runtime* m_frontend; | 100 InspectorFrontend::Runtime* m_frontend; |
| 101 | 101 |
| 102 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; | 102 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; |
| 103 ScriptStateToId m_scriptStateToId; | 103 ScriptStateToId m_scriptStateToId; |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 106 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 107 ScriptDebugServer* m_scriptDebugServer; | 107 ScriptDebugServer* m_scriptDebugServer; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace blink | 110 } // namespace blink |
| 111 | 111 |
| 112 #endif // InspectorRuntimeAgent_h | 112 #endif // InspectorRuntimeAgent_h |
| OLD | NEW |