Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 29 matching lines...) Expand all Loading... | |
| 40 | 40 |
| 41 class MIDIAccessorClient; | 41 class MIDIAccessorClient; |
| 42 | 42 |
| 43 class MIDIAccessor FINAL : public blink::WebMIDIAccessorClient { | 43 class MIDIAccessor FINAL : public blink::WebMIDIAccessorClient { |
| 44 public: | 44 public: |
| 45 static PassOwnPtr<MIDIAccessor> create(MIDIAccessorClient*); | 45 static PassOwnPtr<MIDIAccessor> create(MIDIAccessorClient*); |
| 46 | 46 |
| 47 virtual ~MIDIAccessor() { } | 47 virtual ~MIDIAccessor() { } |
| 48 | 48 |
| 49 void startSession(); | 49 void startSession(); |
| 50 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStamp); | 50 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStamp); |
|
Takashi Toyoshima
2014/06/04 22:03:53
Can you add some useful comments here?
It will be
yhirano
2014/06/05 11:35:25
Done.
| |
| 51 void setClient(MIDIAccessorClient* client) { m_client = client; } | |
| 51 | 52 |
| 52 // blink::WebMIDIAccessorClient | 53 // blink::WebMIDIAccessorClient |
| 53 virtual void didAddInputPort(const blink::WebString& id, const blink::WebStr ing& manufacturer, const blink::WebString& name, const blink::WebString& version ) OVERRIDE; | 54 virtual void didAddInputPort(const blink::WebString& id, const blink::WebStr ing& manufacturer, const blink::WebString& name, const blink::WebString& version ) OVERRIDE; |
| 54 virtual void didAddOutputPort(const blink::WebString& id, const blink::WebSt ring& manufacturer, const blink::WebString& name, const blink::WebString& versio n) OVERRIDE; | 55 virtual void didAddOutputPort(const blink::WebString& id, const blink::WebSt ring& manufacturer, const blink::WebString& name, const blink::WebString& versio n) OVERRIDE; |
| 55 virtual void didStartSession(bool success, const blink::WebString& error, co nst blink::WebString& message) OVERRIDE; | 56 virtual void didStartSession(bool success, const blink::WebString& error, co nst blink::WebString& message) OVERRIDE; |
| 56 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat a, size_t length, double timeStamp) OVERRIDE; | 57 virtual void didReceiveMIDIData(unsigned portIndex, const unsigned char* dat a, size_t length, double timeStamp) OVERRIDE; |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 explicit MIDIAccessor(MIDIAccessorClient*); | 60 explicit MIDIAccessor(MIDIAccessorClient*); |
| 60 | 61 |
| 61 MIDIAccessorClient* m_client; | 62 MIDIAccessorClient* m_client; |
| 62 OwnPtr<blink::WebMIDIAccessor> m_accessor; | 63 OwnPtr<blink::WebMIDIAccessor> m_accessor; |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace WebCore | 66 } // namespace WebCore |
| 66 | 67 |
| 67 #endif // MIDIAccessor_h | 68 #endif // MIDIAccessor_h |
| OLD | NEW |