| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 return; | 456 return; |
| 457 m_enabled = false; | 457 m_enabled = false; |
| 458 reset(); | 458 reset(); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::Clea
rConsoleCallback> callback) | 461 void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::Clea
rConsoleCallback> callback) |
| 462 { | 462 { |
| 463 m_session->setClearConsoleCallback(callback); | 463 m_session->setClearConsoleCallback(callback); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void V8RuntimeAgentImpl::setInspectObjectCallback(PassOwnPtr<V8RuntimeAgent::Ins
pectCallback> callback) | |
| 467 { | |
| 468 m_session->setInspectObjectCallback(callback); | |
| 469 } | |
| 470 | |
| 471 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c
ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev
iew) | 466 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c
ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev
iew) |
| 472 { | 467 { |
| 473 ErrorString errorString; | 468 ErrorString errorString; |
| 474 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString,
V8Debugger::contextId(context)); | 469 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString,
V8Debugger::contextId(context)); |
| 475 if (!injectedScript) | 470 if (!injectedScript) |
| 476 return nullptr; | 471 return nullptr; |
| 477 return injectedScript->wrapObject(&errorString, value, groupName, false, gen
eratePreview); | 472 return injectedScript->wrapObject(&errorString, value, groupName, false, gen
eratePreview); |
| 478 } | 473 } |
| 479 | 474 |
| 480 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co
ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) | 475 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co
ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 539 } |
| 545 | 540 |
| 546 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) | 541 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
xt) |
| 547 { | 542 { |
| 548 if (m_enabled && context->isReported()) { | 543 if (m_enabled && context->isReported()) { |
| 549 context->setReported(false); | 544 context->setReported(false); |
| 550 m_frontend->executionContextDestroyed(context->contextId()); | 545 m_frontend->executionContextDestroyed(context->contextId()); |
| 551 } | 546 } |
| 552 } | 547 } |
| 553 | 548 |
| 549 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj
ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints) |
| 550 { |
| 551 if (m_enabled) |
| 552 m_frontend->inspect(objectToInspect, hints); |
| 553 } |
| 554 |
| 554 } // namespace blink | 555 } // namespace blink |
| OLD | NEW |