Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 1866213002: [DevTools] Move inspect from Inspector to Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inspector-connection
Patch Set: inspectRequested Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 m_enabled = false; 462 m_enabled = false;
463 m_session->discardInjectedScripts(); 463 m_session->discardInjectedScripts();
464 reset(); 464 reset();
465 } 465 }
466 466
467 void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::Clea rConsoleCallback> callback) 467 void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::Clea rConsoleCallback> callback)
468 { 468 {
469 m_session->setClearConsoleCallback(callback); 469 m_session->setClearConsoleCallback(callback);
470 } 470 }
471 471
472 void V8RuntimeAgentImpl::setInspectObjectCallback(PassOwnPtr<V8RuntimeAgent::Ins pectCallback> callback)
473 {
474 m_session->setInspectObjectCallback(callback);
475 }
476
477 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev iew) 472 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev iew)
478 { 473 {
479 ErrorString errorString; 474 ErrorString errorString;
480 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString, V8Debugger::contextId(context)); 475 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString, V8Debugger::contextId(context));
481 if (!injectedScript) 476 if (!injectedScript)
482 return nullptr; 477 return nullptr;
483 return injectedScript->wrapObject(&errorString, value, groupName, false, gen eratePreview); 478 return injectedScript->wrapObject(&errorString, value, groupName, false, gen eratePreview);
484 } 479 }
485 480
486 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) 481 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } 543 }
549 544
550 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte xt) 545 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte xt)
551 { 546 {
552 if (m_enabled && context->isReported()) { 547 if (m_enabled && context->isReported()) {
553 context->setReported(false); 548 context->setReported(false);
554 m_frontend->executionContextDestroyed(context->contextId()); 549 m_frontend->executionContextDestroyed(context->contextId());
555 } 550 }
556 } 551 }
557 552
553 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints)
554 {
555 if (m_enabled)
556 m_frontend->inspectRequested(objectToInspect, hints);
557 }
558
558 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698