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

Side by Side Diff: sky/engine/platform/TracedValue.h

Issue 889823002: Remove TRACE_EVENT indirection through blink::Platform (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/platform/TestingPlatformSupport.cpp ('k') | sky/engine/platform/TracedValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_PLATFORM_TRACEDVALUE_H_
6 #define SKY_ENGINE_PLATFORM_TRACEDVALUE_H_
7
8 #include "sky/engine/platform/EventTracer.h"
9
10 #include "sky/engine/wtf/PassRefPtr.h"
11 #include "sky/engine/wtf/text/WTFString.h"
12
13 namespace blink {
14 class JSONArray;
15 class JSONObject;
16 class JSONValue;
17
18 class PLATFORM_EXPORT TracedValue : public TraceEvent::ConvertableToTraceFormat {
19 WTF_MAKE_NONCOPYABLE(TracedValue);
20
21 public:
22 static PassRefPtr<TracedValue> create();
23
24 void endDictionary();
25 void endArray();
26
27 void setInteger(const char* name, int value);
28 void setDouble(const char* name, double);
29 void setBoolean(const char* name, bool value);
30 void setString(const char* name, const String& value);
31 void beginArray(const char* name);
32 void beginDictionary(const char* name);
33
34 void pushInteger(int);
35 void pushDouble(double);
36 void pushBoolean(bool);
37 void pushString(const String&);
38 void beginArray();
39 void beginDictionary();
40
41 virtual String asTraceFormat() const override;
42
43 private:
44 TracedValue();
45 virtual ~TracedValue();
46
47 JSONObject* currentDictionary() const;
48 JSONArray* currentArray() const;
49
50 Vector<RefPtr<JSONValue> > m_stack;
51 };
52
53 } // namespace blink
54
55 #endif // SKY_ENGINE_PLATFORM_TRACEDVALUE_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/TestingPlatformSupport.cpp ('k') | sky/engine/platform/TracedValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698