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

Unified Diff: public/platform/WebMIDIAccessor.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 | « public/platform/Platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMIDIAccessor.h
diff --git a/public/platform/WebHyphenator.h b/public/platform/WebMIDIAccessor.h
similarity index 64%
copy from public/platform/WebHyphenator.h
copy to public/platform/WebMIDIAccessor.h
index 86bb1bbf9fd94f0de090a7ef96297da2f23396b8..626ac5e69fc932558442e1509e48a7c4c48daa06 100644
--- a/public/platform/WebHyphenator.h
+++ b/public/platform/WebMIDIAccessor.h
@@ -28,26 +28,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebHyphenator_h
-#define WebHyphenator_h
+#ifndef WebMIDIAccessor_h
+#define WebMIDIAccessor_h
-#include "WebCommon.h"
#include "WebString.h"
namespace WebKit {
+
+// Abstract interface to the Chromium MIDI system.
-class WebHyphenator {
+class WebMIDIAccessor {
public:
- // Returns whether we can support hyphenation for the given locale.
- virtual bool canHyphenate(const WebString& locale) { return false; }
-
- // Returns the last position where we can add a hyphen before the given position.
- virtual size_t computeLastHyphenLocation(const WebUChar* characters, size_t length, size_t beforeIndex, const WebString& locale) { return 0; }
-
-protected:
- ~WebHyphenator() { }
+ class Client {
+ public:
+ virtual void addInputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version) = 0;
+ virtual void addOutputPort(const WebString& id, const WebString& manufacturer, const WebString& name, const WebString& version) = 0;
+ virtual void accessApproved(bool approved) = 0;
+ virtual void receiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) = 0;
+
+ protected:
+ virtual ~Client() { }
+ };
+
+ virtual ~WebMIDIAccessor() { }
+
+ virtual void requestAccess(int access) { }
+ virtual void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp) { }
};
} // namespace WebKit
-#endif
+#endif // WebMIDIAccessor_h
« no previous file with comments | « public/platform/Platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698