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 26 matching lines...) Expand all Loading... | |
| 37 | 37 |
| 38 using WebCore::MIDIAccess; | 38 using WebCore::MIDIAccess; |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 MIDIClientProxy::MIDIClientProxy(WebMIDIClient* client) | 42 MIDIClientProxy::MIDIClientProxy(WebMIDIClient* client) |
| 43 : m_client(client) | 43 : m_client(client) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 PassOwnPtr<MIDIClientProxy> MIDIClientProxy::create(WebMIDIClient* client) | |
| 48 { | |
| 49 return adoptPtr(new MIDIClientProxy(client)); | |
|
jochen (gone - plz use gerrit)
2014/04/02 09:28:59
nit should go into the header
| |
| 50 } | |
| 51 | |
| 47 void MIDIClientProxy::requestSysexPermission(PassRefPtrWillBeRawPtr<MIDIAccess> access) | 52 void MIDIClientProxy::requestSysexPermission(PassRefPtrWillBeRawPtr<MIDIAccess> access) |
| 48 { | 53 { |
| 49 if (m_client) | 54 if (m_client) |
|
haraken
2014/04/02 01:08:54
Is it possible that m_client is 0?
gyuyoung-inactive
2014/04/02 01:17:35
Yes, client parameter of WebViewImpl's ctor can be
| |
| 50 m_client->requestSysexPermission(WebMIDIPermissionRequest(access)); | 55 m_client->requestSysexPermission(WebMIDIPermissionRequest(access)); |
| 51 else | 56 else |
| 52 access->setSysexEnabled(false); | 57 access->setSysexEnabled(false); |
| 53 } | 58 } |
| 54 | 59 |
| 55 void MIDIClientProxy::cancelSysexPermissionRequest(MIDIAccess* access) | 60 void MIDIClientProxy::cancelSysexPermissionRequest(MIDIAccess* access) |
| 56 { | 61 { |
| 57 if (m_client) | 62 if (m_client) |
|
haraken
2014/04/02 01:08:54
Ditto.
| |
| 58 m_client->cancelSysexPermissionRequest(WebMIDIPermissionRequest(access)) ; | 63 m_client->cancelSysexPermissionRequest(WebMIDIPermissionRequest(access)) ; |
| 59 } | 64 } |
| 60 | 65 |
| 61 } // namespace blink | 66 } // namespace blink |
| OLD | NEW |