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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 InspectorRuntimeAgent::InspectorRuntimeAgent(InjectedScriptHost* injectedScriptH
ost) | 41 InspectorRuntimeAgent::InspectorRuntimeAgent(InjectedScriptHost* injectedScriptH
ost) |
42 : m_injectedScriptHost(injectedScriptHost) | 42 : m_injectedScriptHost(injectedScriptHost) |
43 { | 43 { |
44 } | 44 } |
45 | 45 |
46 InspectorRuntimeAgent::~InspectorRuntimeAgent() { } | 46 InspectorRuntimeAgent::~InspectorRuntimeAgent() { } |
47 | 47 |
48 void InspectorRuntimeAgent::evaluate(const String& expression, const String& obj
ectGroup, RefPtr<InspectorValue>* result) | 48 void InspectorRuntimeAgent::evaluate(const String& expression, const String& obj
ectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result) |
49 { | 49 { |
50 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainF
rame(); | 50 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainF
rame(); |
51 if (!injectedScript.hasNoValue()) | 51 if (!injectedScript.hasNoValue()) |
52 injectedScript.evaluate(expression, objectGroup, result); | 52 injectedScript.evaluate(expression, objectGroup, includeCommandLineAPI,
result); |
53 } | 53 } |
54 | 54 |
55 void InspectorRuntimeAgent::getCompletions(const String& expression, bool includ
eInspectorCommandLineAPI, RefPtr<InspectorValue>* result) | 55 void InspectorRuntimeAgent::getCompletions(const String& expression, bool includ
eCommandLineAPI, RefPtr<InspectorValue>* result) |
56 { | 56 { |
57 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainF
rame(); | 57 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForMainF
rame(); |
58 if (!injectedScript.hasNoValue()) | 58 if (!injectedScript.hasNoValue()) |
59 injectedScript.getCompletions(expression, includeInspectorCommandLineAPI
, result); | 59 injectedScript.getCompletions(expression, includeCommandLineAPI, result)
; |
60 } | 60 } |
61 | 61 |
62 void InspectorRuntimeAgent::getProperties(PassRefPtr<InspectorObject> objectId,
bool ignoreHasOwnProperty, bool abbreviate, RefPtr<InspectorValue>* result) | 62 void InspectorRuntimeAgent::getProperties(PassRefPtr<InspectorObject> objectId,
bool ignoreHasOwnProperty, bool abbreviate, RefPtr<InspectorValue>* result) |
63 { | 63 { |
64 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjec
tId(objectId.get()); | 64 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjec
tId(objectId.get()); |
65 if (!injectedScript.hasNoValue()) | 65 if (!injectedScript.hasNoValue()) |
66 injectedScript.getProperties(objectId, ignoreHasOwnProperty, abbreviate,
result); | 66 injectedScript.getProperties(objectId, ignoreHasOwnProperty, abbreviate,
result); |
67 } | 67 } |
68 | 68 |
69 void InspectorRuntimeAgent::setPropertyValue(PassRefPtr<InspectorObject> objectI
d, const String& propertyName, const String& expression, RefPtr<InspectorValue>*
result) | 69 void InspectorRuntimeAgent::setPropertyValue(PassRefPtr<InspectorObject> objectI
d, const String& propertyName, const String& expression, RefPtr<InspectorValue>*
result) |
70 { | 70 { |
71 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjec
tId(objectId.get()); | 71 InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjec
tId(objectId.get()); |
72 if (!injectedScript.hasNoValue()) | 72 if (!injectedScript.hasNoValue()) |
73 injectedScript.setPropertyValue(objectId, propertyName, expression, resu
lt); | 73 injectedScript.setPropertyValue(objectId, propertyName, expression, resu
lt); |
74 } | 74 } |
75 | 75 |
76 void InspectorRuntimeAgent::releaseWrapperObjectGroup(long injectedScriptId, con
st String& objectGroup) | 76 void InspectorRuntimeAgent::releaseWrapperObjectGroup(long injectedScriptId, con
st String& objectGroup) |
77 { | 77 { |
78 m_injectedScriptHost->releaseWrapperObjectGroup(injectedScriptId, objectGrou
p); | 78 m_injectedScriptHost->releaseWrapperObjectGroup(injectedScriptId, objectGrou
p); |
79 } | 79 } |
80 | 80 |
81 } // namespace WebCore | 81 } // namespace WebCore |
82 | 82 |
83 #endif // ENABLE(INSPECTOR) | 83 #endif // ENABLE(INSPECTOR) |
OLD | NEW |