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

Side by Side Diff: Source/modules/webaudio/WaveShaperNode.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void WaveShaperNode::setOversample(const String& type, ExceptionCode& ec) 57 void WaveShaperNode::setOversample(const String& type, ExceptionCode& ec)
58 { 58 {
59 if (type == "none") 59 if (type == "none")
60 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone ); 60 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone );
61 else if (type == "2x") 61 else if (type == "2x")
62 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x); 62 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x);
63 else if (type == "4x") 63 else if (type == "4x")
64 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x); 64 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x);
65 else 65 else
66 ec = INVALID_STATE_ERR; 66 ec = InvalidStateError;
67 } 67 }
68 68
69 String WaveShaperNode::oversample() const 69 String WaveShaperNode::oversample() const
70 { 70 {
71 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample ()) { 71 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample ()) {
72 case WaveShaperProcessor::OverSampleNone: 72 case WaveShaperProcessor::OverSampleNone:
73 return "none"; 73 return "none";
74 case WaveShaperProcessor::OverSample2x: 74 case WaveShaperProcessor::OverSample2x:
75 return "2x"; 75 return "2x";
76 case WaveShaperProcessor::OverSample4x: 76 case WaveShaperProcessor::OverSample4x:
77 return "4x"; 77 return "4x";
78 default: 78 default:
79 ASSERT_NOT_REACHED(); 79 ASSERT_NOT_REACHED();
80 return "none"; 80 return "none";
81 } 81 }
82 } 82 }
83 83
84 } // namespace WebCore 84 } // namespace WebCore
85 85
86 #endif // ENABLE(WEB_AUDIO) 86 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/OfflineAudioContext.cpp ('k') | Source/modules/webdatabase/DOMWindowWebDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698