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

Side by Side Diff: public/platform/Platform.h

Issue 17101035: Web MIDI: refine MIDIAccessor and WebMIDIAccessor APIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/core/platform/midi/MIDIAccessorClient.h ('k') | public/platform/WebMIDIAccessor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 virtual unsigned audioHardwareOutputChannels() { return 0; } 146 virtual unsigned audioHardwareOutputChannels() { return 0; }
147 147
148 // Creates a device for audio I/O. 148 // Creates a device for audio I/O.
149 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired. 149 // Pass in (numberOfInputChannels > 0) if live/local audio input is desired.
150 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*, const WebString& deviceId) { return 0; } 150 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*, const WebString& deviceId) { return 0; }
151 151
152 // FIXME: remove deprecated APIs once chromium switches over to new method. 152 // FIXME: remove deprecated APIs once chromium switches over to new method.
153 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; } 153 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; }
154 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*) { return 0; } 154 virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned number OfInputChannels, unsigned numberOfChannels, double sampleRate, WebAudioDevice::R enderCallback*) { return 0; }
155 155
156
156 // MIDI ---------------------------------------------------------------- 157 // MIDI ----------------------------------------------------------------
157 158
158 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform 159 // Creates a platform dependent WebMIDIAccessor. MIDIAccessor under platform
159 // creates and owns it. 160 // creates and owns it.
160 virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAccessorClient*) { return 0; } 161 virtual WebMIDIAccessor* createMIDIAccessor(WebMIDIAccessorClient*) { return 0; }
161 162
163
162 // Blob ---------------------------------------------------------------- 164 // Blob ----------------------------------------------------------------
163 165
164 // Must return non-null. 166 // Must return non-null.
165 virtual WebBlobRegistry* blobRegistry() { return 0; } 167 virtual WebBlobRegistry* blobRegistry() { return 0; }
166 168
167 169
168 // Database ------------------------------------------------------------ 170 // Database ------------------------------------------------------------
169 171
170 // Opens a database file; dirHandle should be 0 if the caller does not need 172 // Opens a database file; dirHandle should be 0 if the caller does not need
171 // a handle to the directory containing this file 173 // a handle to the directory containing this file
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // If null, the platform stops providing device motion data to the current l istener. 545 // If null, the platform stops providing device motion data to the current l istener.
544 virtual void setDeviceMotionListener(WebKit::WebDeviceMotionListener*) { } 546 virtual void setDeviceMotionListener(WebKit::WebDeviceMotionListener*) { }
545 547
546 protected: 548 protected:
547 virtual ~Platform() { } 549 virtual ~Platform() { }
548 }; 550 };
549 551
550 } // namespace WebKit 552 } // namespace WebKit
551 553
552 #endif 554 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/midi/MIDIAccessorClient.h ('k') | public/platform/WebMIDIAccessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698