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

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

Issue 1917733002: [DevTools] Move part of CommandLineAPI to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 void V8RuntimeAgentImpl::disable(ErrorString* errorString) 373 void V8RuntimeAgentImpl::disable(ErrorString* errorString)
374 { 374 {
375 if (!m_enabled) 375 if (!m_enabled)
376 return; 376 return;
377 m_enabled = false; 377 m_enabled = false;
378 m_session->discardInjectedScripts(); 378 m_session->discardInjectedScripts();
379 reset(); 379 reset();
380 } 380 }
381 381
382 void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::Clea rConsoleCallback> callback)
383 {
384 m_session->setClearConsoleCallback(callback);
385 }
386
387 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev iew) 382 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapObject(v8::Local<v8::Context> c ontext, v8::Local<v8::Value> value, const String16& groupName, bool generatePrev iew)
388 { 383 {
389 ErrorString errorString; 384 ErrorString errorString;
390 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString, V8Debugger::contextId(context)); 385 InjectedScript* injectedScript = m_session->findInjectedScript(&errorString, V8Debugger::contextId(context));
391 if (!injectedScript) 386 if (!injectedScript)
392 return nullptr; 387 return nullptr;
393 return injectedScript->wrapObject(&errorString, value, groupName, false, gen eratePreview); 388 return injectedScript->wrapObject(&errorString, value, groupName, false, gen eratePreview);
394 } 389 }
395 390
396 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) 391 PassOwnPtr<RemoteObject> V8RuntimeAgentImpl::wrapTable(v8::Local<v8::Context> co ntext, v8::Local<v8::Value> table, v8::Local<v8::Value> columns)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 460 }
466 } 461 }
467 462
468 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints) 463 void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> obj ectToInspect, PassOwnPtr<protocol::DictionaryValue> hints)
469 { 464 {
470 if (m_enabled) 465 if (m_enabled)
471 m_frontend->inspectRequested(objectToInspect, hints); 466 m_frontend->inspectRequested(objectToInspect, hints);
472 } 467 }
473 468
474 } // namespace blink 469 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698