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 |