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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // initialize() and uninitialize(). 64 // initialize() and uninitialize().
65 AudioContext::AutoLocker contextLocker(context()); 65 AudioContext::AutoLocker contextLocker(context());
66 66
67 if (type == "none") 67 if (type == "none")
68 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone ); 68 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone );
69 else if (type == "2x") 69 else if (type == "2x")
70 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x); 70 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x);
71 else if (type == "4x") 71 else if (type == "4x")
72 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x); 72 waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x);
73 else 73 else
74 es.throwDOMException(InvalidStateError); 74 es.throwUninformativeAndGenericDOMException(InvalidStateError);
75 } 75 }
76 76
77 String WaveShaperNode::oversample() const 77 String WaveShaperNode::oversample() const
78 { 78 {
79 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample ()) { 79 switch (const_cast<WaveShaperNode*>(this)->waveShaperProcessor()->oversample ()) {
80 case WaveShaperProcessor::OverSampleNone: 80 case WaveShaperProcessor::OverSampleNone:
81 return "none"; 81 return "none";
82 case WaveShaperProcessor::OverSample2x: 82 case WaveShaperProcessor::OverSample2x:
83 return "2x"; 83 return "2x";
84 case WaveShaperProcessor::OverSample4x: 84 case WaveShaperProcessor::OverSample4x:
85 return "4x"; 85 return "4x";
86 default: 86 default:
87 ASSERT_NOT_REACHED(); 87 ASSERT_NOT_REACHED();
88 return "none"; 88 return "none";
89 } 89 }
90 } 90 }
91 91
92 } // namespace WebCore 92 } // namespace WebCore
93 93
94 #endif // ENABLE(WEB_AUDIO) 94 #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