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

Side by Side Diff: Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp

Issue 113213002: Rename toWebCoreString*() utility methods to toCoreString*() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Keep "to" prefix Created 7 years 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 27 matching lines...) Expand all
38 38
39 if (value->IsNumber()) { 39 if (value->IsNumber()) {
40 bool ok = false; 40 bool ok = false;
41 uint32_t type = toUInt32(value, ok); 41 uint32_t type = toUInt32(value, ok);
42 if (!ok || !imp->setType(type)) 42 if (!ok || !imp->setType(type))
43 throwTypeError("Illegal OscillatorNode type", info.GetIsolate()); 43 throwTypeError("Illegal OscillatorNode type", info.GetIsolate());
44 return; 44 return;
45 } 45 }
46 46
47 if (value->IsString()) { 47 if (value->IsString()) {
48 String type = toWebCoreString(value.As<v8::String>()); 48 String type = toCoreString(value.As<v8::String>());
49 if (type == "sine" || type == "square" || type == "sawtooth" || type == "triangle") { 49 if (type == "sine" || type == "square" || type == "sawtooth" || type == "triangle") {
50 imp->setType(type); 50 imp->setType(type);
51 return; 51 return;
52 } 52 }
53 } 53 }
54 54
55 throwTypeError("Illegal OscillatorNode type", info.GetIsolate()); 55 throwTypeError("Illegal OscillatorNode type", info.GetIsolate());
56 } 56 }
57 57
58 } // namespace WebCore 58 } // namespace WebCore
59 59
60 #endif // ENABLE(WEB_AUDIO) 60 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp ('k') | Source/bindings/v8/custom/V8PannerNodeCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698