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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.cpp

Issue 1620673002: Remove Blink's ConvertableToTraceFormat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/websockets/InspectorWebSocketEvents.h" 5 #include "modules/websockets/InspectorWebSocketEvents.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "platform/TracedValue.h"
9 #include "platform/weborigin/KURL.h" 8 #include "platform/weborigin/KURL.h"
10 9
11 namespace blink { 10 namespace blink {
12 11
13 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorWebSocketCreateEvent:: data(Document* document, unsigned long identifier, const KURL& url, const String & protocol) 12 PassRefPtr<TracedValue> InspectorWebSocketCreateEvent::data(Document* document, unsigned long identifier, const KURL& url, const String& protocol)
14 { 13 {
15 RefPtr<TracedValue> value = TracedValue::create(); 14 RefPtr<TracedValue> value = TracedValue::create();
16 value->setInteger("identifier", identifier); 15 value->setInteger("identifier", identifier);
17 value->setString("url", url.string()); 16 value->setString("url", url.string());
18 value->setString("frame", toHexString(document->frame())); 17 value->setString("frame", toHexString(document->frame()));
19 if (!protocol.isNull()) 18 if (!protocol.isNull())
20 value->setString("webSocketProtocol", protocol); 19 value->setString("webSocketProtocol", protocol);
21 setCallStack(value.get()); 20 setCallStack(value.get());
22 return value.release(); 21 return value.release();
23 } 22 }
24 23
25 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorWebSocketEvent::data(D ocument* document, unsigned long identifier) 24 PassRefPtr<TracedValue> InspectorWebSocketEvent::data(Document* document, unsign ed long identifier)
26 { 25 {
27 RefPtr<TracedValue> value = TracedValue::create(); 26 RefPtr<TracedValue> value = TracedValue::create();
28 value->setInteger("identifier", identifier); 27 value->setInteger("identifier", identifier);
29 value->setString("frame", toHexString(document->frame())); 28 value->setString("frame", toHexString(document->frame()));
30 setCallStack(value.get()); 29 setCallStack(value.get());
31 return value.release(); 30 return value.release();
32 } 31 }
33 32
34 } // namespace blink 33 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698