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

Side by Side Diff: src/inspector/string-util.h

Issue 2467853003: [inspector] migrate Runtime to new style (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 | « src/inspector/remote-object-id.cc ('k') | src/inspector/string-util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 #ifndef V8_INSPECTOR_STRINGUTIL_H_ 5 #ifndef V8_INSPECTOR_STRINGUTIL_H_
6 #define V8_INSPECTOR_STRINGUTIL_H_ 6 #define V8_INSPECTOR_STRINGUTIL_H_
7 7
8 #include "src/base/macros.h" 8 #include "src/base/macros.h"
9 #include "src/inspector/string-16.h" 9 #include "src/inspector/string-16.h"
10 10
(...skipping 22 matching lines...) Expand all
33 static void builderReserve(StringBuilder& builder, size_t capacity) { 33 static void builderReserve(StringBuilder& builder, size_t capacity) {
34 builder.reserveCapacity(capacity); 34 builder.reserveCapacity(capacity);
35 } 35 }
36 }; 36 };
37 37
38 std::unique_ptr<protocol::Value> parseJSON(const StringView& json); 38 std::unique_ptr<protocol::Value> parseJSON(const StringView& json);
39 std::unique_ptr<protocol::Value> parseJSON(const String16& json); 39 std::unique_ptr<protocol::Value> parseJSON(const String16& json);
40 40
41 } // namespace protocol 41 } // namespace protocol
42 42
43 std::unique_ptr<protocol::Value> toProtocolValue(protocol::String* errorString,
44 v8::Local<v8::Context>,
45 v8::Local<v8::Value>,
46 int maxDepth = 1000);
47
48 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&); 43 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&);
49 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&); 44 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&);
50 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*); 45 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*);
51 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&); 46 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&);
52 // TODO(dgozman): rename to toString16. 47 // TODO(dgozman): rename to toString16.
53 String16 toProtocolString(v8::Local<v8::String>); 48 String16 toProtocolString(v8::Local<v8::String>);
54 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>); 49 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>);
55 String16 toString16(const StringView&); 50 String16 toString16(const StringView&);
56 StringView toStringView(const String16&); 51 StringView toStringView(const String16&);
57 bool stringViewStartsWith(const StringView&, const char*); 52 bool stringViewStartsWith(const StringView&, const char*);
58 53
59 class StringBufferImpl : public StringBuffer { 54 class StringBufferImpl : public StringBuffer {
60 public: 55 public:
61 // Destroys string's content. 56 // Destroys string's content.
62 static std::unique_ptr<StringBufferImpl> adopt(String16&); 57 static std::unique_ptr<StringBufferImpl> adopt(String16&);
63 const StringView& string() override { return m_string; } 58 const StringView& string() override { return m_string; }
64 59
65 private: 60 private:
66 explicit StringBufferImpl(String16&); 61 explicit StringBufferImpl(String16&);
67 String16 m_owner; 62 String16 m_owner;
68 StringView m_string; 63 StringView m_string;
69 64
70 DISALLOW_COPY_AND_ASSIGN(StringBufferImpl); 65 DISALLOW_COPY_AND_ASSIGN(StringBufferImpl);
71 }; 66 };
72 67
73 } // namespace v8_inspector 68 } // namespace v8_inspector
74 69
75 #endif // V8_INSPECTOR_STRINGUTIL_H_ 70 #endif // V8_INSPECTOR_STRINGUTIL_H_
OLDNEW
« no previous file with comments | « src/inspector/remote-object-id.cc ('k') | src/inspector/string-util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698