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

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

Issue 1007703003: [bindings] Utilize ScriptValue::from and remove IDB* => ScriptValue conversion methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/webdatabase/sqlite/SQLValue.h" 9 #include "modules/webdatabase/sqlite/SQLValue.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class IDBAny;
14 class IDBKey;
15 class IDBKeyPath;
16
13 inline v8::Handle<v8::Value> toV8(const SQLValue& sqlValue, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate) 17 inline v8::Handle<v8::Value> toV8(const SQLValue& sqlValue, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate)
14 { 18 {
15 switch (sqlValue.type()) { 19 switch (sqlValue.type()) {
16 case SQLValue::NullValue: 20 case SQLValue::NullValue:
17 return v8::Null(isolate); 21 return v8::Null(isolate);
18 case SQLValue::NumberValue: 22 case SQLValue::NumberValue:
19 return v8::Number::New(isolate, sqlValue.number()); 23 return v8::Number::New(isolate, sqlValue.number());
20 case SQLValue::StringValue: 24 case SQLValue::StringValue:
21 return v8String(isolate, sqlValue.string()); 25 return v8String(isolate, sqlValue.string());
22 } 26 }
23 ASSERT_NOT_REACHED(); 27 ASSERT_NOT_REACHED();
24 return v8::Local<v8::Value>(); 28 return v8::Local<v8::Value>();
25 } 29 }
26 30
31 v8::Local<v8::Value> toV8(const IDBKeyPath&, v8::Local<v8::Object> creationConte xt, v8::Isolate*);
32 v8::Local<v8::Value> toV8(const IDBKey*, v8::Local<v8::Object> creationContext, v8::Isolate*);
33 v8::Local<v8::Value> toV8(const IDBAny*, v8::Local<v8::Object> creationContext, v8::Isolate*);
34
27 } // namespace blink 35 } // namespace blink
28 36
29 #endif // ToV8ForModules_h 37 #endif // ToV8ForModules_h
30 38
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/modules/v8/V8BindingForModules.h » ('j') | Source/bindings/modules/v8/V8BindingForModules.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698