| OLD | NEW |
| 1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
| 2 // All rights reserved. | 2 // 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 15 matching lines...) Expand all Loading... |
| 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 #include "config.h" | 30 #include "config.h" |
| 31 | 31 |
| 32 #if ENABLE(NOTIFICATIONS) | 32 #if ENABLE(NOTIFICATIONS) |
| 33 | 33 |
| 34 #include "DartHTMLMediaElement.h" | 34 #include "DartHTMLMediaElement.h" |
| 35 | 35 |
| 36 #include "DartMediaController.h" |
| 37 |
| 36 namespace WebCore { | 38 namespace WebCore { |
| 37 | 39 |
| 38 namespace DartHTMLMediaElementInternal { | 40 namespace DartHTMLMediaElementInternal { |
| 39 | 41 |
| 40 void controllerSetter(Dart_NativeArguments) | 42 void controllerSetter(Dart_NativeArguments args) |
| 41 { | 43 { |
| 42 // FIXME: proper implementation. | 44 DartApiScope dartApiScope; |
| 43 DART_UNIMPLEMENTED(); | 45 Dart_Handle exception = 0; |
| 46 { |
| 47 HTMLMediaElement* receiver = DartDOMWrapper::receiver<HTMLMediaElement>(
args); |
| 48 MediaController* controller = DartDOMWrapper::unwrapDartWrapper<DartMedi
aController>(Dart_GetNativeArgument(args, 1), exception); |
| 49 if (exception) |
| 50 goto fail; |
| 51 |
| 52 // 4.8.10.11.2 Media controllers: controller attribute. |
| 53 // On setting, it must first remove the element's mediagroup attribute,
if any, |
| 54 receiver->setMediaGroup(String()); |
| 55 // and then set the current media controller to the given value. |
| 56 receiver->setController(controller); |
| 57 return; |
| 58 } |
| 59 |
| 60 fail: |
| 61 Dart_ThrowException(exception); |
| 62 ASSERT_NOT_REACHED(); |
| 44 } | 63 } |
| 45 | 64 |
| 46 } | 65 } |
| 47 | 66 |
| 48 } | 67 } |
| 49 | 68 |
| 50 #endif // ENABLE(NOTIFICATIONS) | 69 #endif // ENABLE(NOTIFICATIONS) |
| OLD | NEW |