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

Unified Diff: Source/core/platform/midi/MIDIAccessor.h

Issue 16288002: Web MIDI API (work in progress) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add accessApproved() 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/platform/midi/MIDIAccessorChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/midi/MIDIAccessor.h
diff --git a/Source/core/platform/ColorChooserClient.h b/Source/core/platform/midi/MIDIAccessor.h
similarity index 66%
copy from Source/core/platform/ColorChooserClient.h
copy to Source/core/platform/midi/MIDIAccessor.h
index 3835d0618a5d6f5ca19bdc83b143f42b05a1d549..b8e6a6e6c7bdb4eeee1f80eb4f1434b0a4ed8dfe 100644
--- a/Source/core/platform/ColorChooserClient.h
+++ b/Source/core/platform/midi/MIDIAccessor.h
@@ -28,31 +28,33 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ColorChooserClient_h
-#define ColorChooserClient_h
+#ifndef MIDIAccessor_h
+#define MIDIAccessor_h
-#include "core/platform/ColorChooser.h"
-#include "core/platform/graphics/IntRect.h"
+#include "wtf/Forward.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
namespace WebCore {
-class Color;
+class MIDIAccessorClient {
+public:
+ virtual void addInputPort(const String& id, const String& manufacturer, const String& name, const String& version) = 0;
+ virtual void addOutputPort(const String& id, const String& manufacturer, const String& name, const String& version) = 0;
+ virtual void accessApproved(bool approved) = 0;
+ virtual void receiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) = 0;
+};
-class ColorChooserClient {
+class MIDIAccessor {
public:
- virtual ~ColorChooserClient() { }
-
- virtual void didChooseColor(const Color&) = 0;
- virtual void didEndChooser() = 0;
- virtual IntRect elementRectRelativeToRootView() const = 0;
- virtual Color currentColor() = 0;
- virtual bool shouldShowSuggestions() const = 0;
- virtual Vector<Color> suggestions() const = 0;
+ static PassOwnPtr<MIDIAccessor> create(MIDIAccessorClient* client);
+
+ virtual ~MIDIAccessor() { }
+
+ virtual void requestAccess(int access) = 0;
+ virtual void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) = 0;
};
} // namespace WebCore
-#endif // ColorChooserClient_h
+#endif // MIDIAccessor_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/platform/midi/MIDIAccessorChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698