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

Side by Side Diff: Source/core/platform/midi/MIDIAccessor.cpp

Issue 18325007: Web MIDI: introduce WebMIDIClient API to request a permission (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client) 49 MIDIAccessor::MIDIAccessor(MIDIAccessorClient* client)
50 : m_client(client) 50 : m_client(client)
51 { 51 {
52 ASSERT(client); 52 ASSERT(client);
53 53
54 m_accessor = adoptPtr(WebKit::Platform::current()->createMIDIAccessor(this)) ; 54 m_accessor = adoptPtr(WebKit::Platform::current()->createMIDIAccessor(this)) ;
55 55
56 ASSERT(m_accessor); 56 ASSERT(m_accessor);
57 } 57 }
58 58
59 void MIDIAccessor::requestAccess(bool access) 59 void MIDIAccessor::requestAccess(const String& origin, bool access)
60 { 60 {
61 m_accessor->requestAccess(access); 61 m_accessor->requestAccess(WebString(origin), access);
62 } 62 }
63 63
64 void MIDIAccessor::sendMIDIData(unsigned portIndex, const unsigned char* data, s ize_t length, double timeStamp) 64 void MIDIAccessor::sendMIDIData(unsigned portIndex, const unsigned char* data, s ize_t length, double timeStamp)
65 { 65 {
66 m_accessor->sendMIDIData(portIndex, data, length, timeStamp); 66 m_accessor->sendMIDIData(portIndex, data, length, timeStamp);
67 } 67 }
68 68
69 void MIDIAccessor::didAddInputPort(const WebString& id, const WebString& manufac turer, const WebString& name, const WebString& version) 69 void MIDIAccessor::didAddInputPort(const WebString& id, const WebString& manufac turer, const WebString& name, const WebString& version)
70 { 70 {
71 m_client->didAddInputPort(id, manufacturer, name, version); 71 m_client->didAddInputPort(id, manufacturer, name, version);
(...skipping 13 matching lines...) Expand all
85 { 85 {
86 m_client->didBlockAccess(); 86 m_client->didBlockAccess();
87 } 87 }
88 88
89 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, const unsigned char* d ata, size_t length, double timeStamp) 89 void MIDIAccessor::didReceiveMIDIData(unsigned portIndex, const unsigned char* d ata, size_t length, double timeStamp)
90 { 90 {
91 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp); 91 m_client->didReceiveMIDIData(portIndex, data, length, timeStamp);
92 } 92 }
93 93
94 } // namespace WebCore 94 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698