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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorLogAgent.cpp

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win compile Created 4 years, 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/inspector/InspectorLogAgent.h" 5 #include "core/inspector/InspectorLogAgent.h"
6 6
7 #include "bindings/core/v8/SourceLocation.h" 7 #include "bindings/core/v8/SourceLocation.h"
8 #include "core/inspector/ConsoleMessage.h" 8 #include "core/inspector/ConsoleMessage.h"
9 #include "core/inspector/ConsoleMessageStorage.h" 9 #include "core/inspector/ConsoleMessageStorage.h"
10 #include "core/inspector/IdentifiersFactory.h" 10 #include "core/inspector/IdentifiersFactory.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 std::unique_ptr<protocol::Log::LogEntry> entry = 80 std::unique_ptr<protocol::Log::LogEntry> entry =
81 protocol::Log::LogEntry::create() 81 protocol::Log::LogEntry::create()
82 .setSource(messageSourceValue(message->source())) 82 .setSource(messageSourceValue(message->source()))
83 .setLevel(messageLevelValue(message->level())) 83 .setLevel(messageLevelValue(message->level()))
84 .setText(message->message()) 84 .setText(message->message())
85 .setTimestamp(message->timestamp()) 85 .setTimestamp(message->timestamp())
86 .build(); 86 .build();
87 if (!message->location()->url().isEmpty()) 87 if (!message->location()->url().isEmpty())
88 entry->setUrl(message->location()->url()); 88 entry->setUrl(message->location()->url());
89 std::unique_ptr<protocol::Runtime::API::StackTrace> stackTrace = message->lo cation()->buildInspectorObject(); 89 std::unique_ptr<v8_inspector::protocol::Runtime::API::StackTrace> stackTrace = message->location()->buildInspectorObject();
90 if (stackTrace) 90 if (stackTrace)
91 entry->setStackTrace(std::move(stackTrace)); 91 entry->setStackTrace(std::move(stackTrace));
92 if (message->location()->lineNumber()) 92 if (message->location()->lineNumber())
93 entry->setLineNumber(message->location()->lineNumber() - 1); 93 entry->setLineNumber(message->location()->lineNumber() - 1);
94 if (message->source() == WorkerMessageSource && !message->workerId().isEmpty ()) 94 if (message->source() == WorkerMessageSource && !message->workerId().isEmpty ())
95 entry->setWorkerId(message->workerId()); 95 entry->setWorkerId(message->workerId());
96 if (message->source() == NetworkMessageSource && message->requestIdentifier( )) 96 if (message->source() == NetworkMessageSource && message->requestIdentifier( ))
97 entry->setNetworkRequestId(IdentifiersFactory::requestId(message->reques tIdentifier())); 97 entry->setNetworkRequestId(IdentifiersFactory::requestId(message->reques tIdentifier()));
98 98
99 frontend()->entryAdded(std::move(entry)); 99 frontend()->entryAdded(std::move(entry));
(...skipping 30 matching lines...) Expand all
130 m_enabled = false; 130 m_enabled = false;
131 m_instrumentingAgents->removeInspectorLogAgent(this); 131 m_instrumentingAgents->removeInspectorLogAgent(this);
132 } 132 }
133 133
134 void InspectorLogAgent::clear(ErrorString*) 134 void InspectorLogAgent::clear(ErrorString*)
135 { 135 {
136 m_storage->clear(); 136 m_storage->clear();
137 } 137 }
138 138
139 } // namespace blink 139 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698