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

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

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context ) 647 void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context )
648 { 648 {
649 if (!m_enabled) 649 if (!m_enabled)
650 return; 650 return;
651 context->setReported(true); 651 context->setReported(true);
652 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description = protocol::Runtime::ExecutionContextDescription::create() 652 std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description = protocol::Runtime::ExecutionContextDescription::create()
653 .setId(context->contextId()) 653 .setId(context->contextId())
654 .setName(context->humanReadableName()) 654 .setName(context->humanReadableName())
655 .setOrigin(context->origin()).build(); 655 .setOrigin(context->origin()).build();
656 if (!context->auxData().isEmpty()) 656 if (!context->auxData().isEmpty())
657 description->setAuxData(protocol::DictionaryValue::cast(parseJSON(contex t->auxData()))); 657 description->setAuxData(protocol::DictionaryValue::cast(protocol::parseJ SON(context->auxData())));
658 m_frontend.executionContextCreated(std::move(description)); 658 m_frontend.executionContextCreated(std::move(description));
659 } 659 }
660 660
661 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte xt) 661 void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte xt)
662 { 662 {
663 if (m_enabled && context->isReported()) { 663 if (m_enabled && context->isReported()) {
664 context->setReported(false); 664 context->setReported(false);
665 m_frontend.executionContextDestroyed(context->contextId()); 665 m_frontend.executionContextDestroyed(context->contextId());
666 } 666 }
667 } 667 }
(...skipping 10 matching lines...) Expand all
678 reportMessage(message, true); 678 reportMessage(message, true);
679 } 679 }
680 680
681 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review) 681 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review)
682 { 682 {
683 message->reportToFrontend(&m_frontend, m_session, generatePreview); 683 message->reportToFrontend(&m_frontend, m_session, generatePreview);
684 m_frontend.flush(); 684 m_frontend.flush();
685 } 685 }
686 686
687 } // namespace v8_inspector 687 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698