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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/ToV8ForModules.h

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 years, 11 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 #ifndef ToV8ForModules_h 5 #ifndef ToV8ForModules_h
6 #define ToV8ForModules_h 6 #define ToV8ForModules_h
7 7
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/webdatabase/sqlite/SQLValue.h" 10 #include "modules/webdatabase/sqlite/SQLValue.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class IDBAny; 14 class IDBAny;
15 class IDBKey; 15 class IDBKey;
16 class IDBKeyPath; 16 class IDBKeyPath;
17 17
18 inline v8::Local<v8::Value> toV8(const SQLValue& sqlValue, 18 inline v8::Local<v8::Value> ToV8(const SQLValue& sqlValue,
19 v8::Local<v8::Object> creationContext, 19 v8::Local<v8::Object> creationContext,
20 v8::Isolate* isolate) { 20 v8::Isolate* isolate) {
21 switch (sqlValue.getType()) { 21 switch (sqlValue.getType()) {
22 case SQLValue::NullValue: 22 case SQLValue::NullValue:
23 return v8::Null(isolate); 23 return v8::Null(isolate);
24 case SQLValue::NumberValue: 24 case SQLValue::NumberValue:
25 return v8::Number::New(isolate, sqlValue.number()); 25 return v8::Number::New(isolate, sqlValue.number());
26 case SQLValue::StringValue: 26 case SQLValue::StringValue:
27 return v8String(isolate, sqlValue.string()); 27 return v8String(isolate, sqlValue.string());
28 } 28 }
29 ASSERT_NOT_REACHED(); 29 ASSERT_NOT_REACHED();
30 return v8::Local<v8::Value>(); 30 return v8::Local<v8::Value>();
31 } 31 }
32 32
33 v8::Local<v8::Value> toV8(const IDBKeyPath&, 33 v8::Local<v8::Value> ToV8(const IDBKeyPath&,
34 v8::Local<v8::Object> creationContext, 34 v8::Local<v8::Object> creationContext,
35 v8::Isolate*); 35 v8::Isolate*);
36 MODULES_EXPORT v8::Local<v8::Value> toV8(const IDBKey*, 36 MODULES_EXPORT v8::Local<v8::Value> ToV8(const IDBKey*,
37 v8::Local<v8::Object> creationContext, 37 v8::Local<v8::Object> creationContext,
38 v8::Isolate*); 38 v8::Isolate*);
39 v8::Local<v8::Value> toV8(const IDBAny*, 39 v8::Local<v8::Value> ToV8(const IDBAny*,
40 v8::Local<v8::Object> creationContext, 40 v8::Local<v8::Object> creationContext,
41 v8::Isolate*); 41 v8::Isolate*);
42 42
43 } // namespace blink 43 } // namespace blink
44 44
45 #endif // ToV8ForModules_h 45 #endif // ToV8ForModules_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698