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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8StringResource.h

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 size_t length() const override { return m_plainString.impl()->length(); } 149 size_t length() const override { return m_plainString.impl()->length(); }
150 const char* data() const override { 150 const char* data() const override {
151 return reinterpret_cast<const char*>(m_plainString.impl()->characters8()); 151 return reinterpret_cast<const char*>(m_plainString.impl()->characters8());
152 } 152 }
153 }; 153 };
154 154
155 enum ExternalMode { Externalize, DoNotExternalize }; 155 enum ExternalMode { Externalize, DoNotExternalize };
156 156
157 template <typename StringType> 157 template <typename StringType>
158 CORE_EXPORT StringType v8StringToWebCoreString(v8::Local<v8::String>, 158 CORE_EXPORT StringType V8StringToWebCoreString(v8::Local<v8::String>,
159 ExternalMode); 159 ExternalMode);
160 CORE_EXPORT String int32ToWebCoreString(int value); 160 CORE_EXPORT String int32ToWebCoreString(int value);
161 161
162 // V8StringResource is an adapter class that converts V8 values to Strings 162 // V8StringResource is an adapter class that converts V8 values to Strings
163 // or AtomicStrings as appropriate, using multiple typecast operators. 163 // or AtomicStrings as appropriate, using multiple typecast operators.
164 enum V8StringResourceMode { 164 enum V8StringResourceMode {
165 DefaultMode, 165 DefaultMode,
166 TreatNullAsEmptyString, 166 TreatNullAsEmptyString,
167 TreatNullAsNullString, 167 TreatNullAsNullString,
168 TreatNullAndUndefinedAsNullString 168 TreatNullAndUndefinedAsNullString
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 template <> 302 template <>
303 inline String 303 inline String
304 V8StringResource<TreatNullAndUndefinedAsNullString>::fallbackString() const { 304 V8StringResource<TreatNullAndUndefinedAsNullString>::fallbackString() const {
305 return String(); 305 return String();
306 } 306 }
307 307
308 } // namespace blink 308 } // namespace blink
309 309
310 #endif // V8StringResource_h 310 #endif // V8StringResource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698