| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (exception) | 441 if (exception) |
| 442 this->setException(exception); | 442 this->setException(exception); |
| 443 } | 443 } |
| 444 operator const NativeValue&() const { return this->value()->propertyReferenc
e(); } | 444 operator const NativeValue&() const { return this->value()->propertyReferenc
e(); } |
| 445 operator NativeValue&() { return this->value()->propertyReference(); } | 445 operator NativeValue&() { return this->value()->propertyReference(); } |
| 446 operator PassRefPtr<SVGPropertyTearOff<NativeValue> >() const { return this-
>value(); } | 446 operator PassRefPtr<SVGPropertyTearOff<NativeValue> >() const { return this-
>value(); } |
| 447 operator SVGPropertyTearOff<NativeValue>*() const { return this->value().get
(); } | 447 operator SVGPropertyTearOff<NativeValue>*() const { return this->value().get
(); } |
| 448 }; | 448 }; |
| 449 #endif // ENABLE(SVG) | 449 #endif // ENABLE(SVG) |
| 450 | 450 |
| 451 template <class ElementType> |
| 452 class ParameterAdapter< Vector<ElementType> > : public ParameterAdapterBase< Vec
tor<ElementType > > { |
| 453 public: |
| 454 explicit ParameterAdapter(Dart_Handle handle) |
| 455 { |
| 456 Dart_Handle exception = 0; |
| 457 DartUtilities::dartListToVector(handle, this->m_value, exception); |
| 458 if (exception) |
| 459 this->setException(exception); |
| 460 } |
| 461 Vector<ElementType>* operator->() { return &this->m_value; } |
| 462 ElementType& operator[](size_t i) { return this->m_value[i]; } |
| 463 }; |
| 464 |
| 451 template <class NativeValue, class DartBindingsClass> | 465 template <class NativeValue, class DartBindingsClass> |
| 452 class ParameterAdapter< RefPtr<NativeValue>, DartBindingsClass > : public Parame
terAdapterBase< RefPtr<NativeValue> > { | 466 class ParameterAdapter< RefPtr<NativeValue>, DartBindingsClass > : public Parame
terAdapterBase< RefPtr<NativeValue> > { |
| 453 public: | 467 public: |
| 454 explicit ParameterAdapter(Dart_Handle handle) | 468 explicit ParameterAdapter(Dart_Handle handle) |
| 455 { | 469 { |
| 456 Dart_Handle exception = 0; | 470 Dart_Handle exception = 0; |
| 457 this->setValue(DartBindingsClass::toNative(handle, exception)); | 471 this->setValue(DartBindingsClass::toNative(handle, exception)); |
| 458 if (exception) | 472 if (exception) |
| 459 this->setException(exception); | 473 this->setException(exception); |
| 460 } | 474 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 explicit ParameterAdapter(Dart_Handle handle) | 616 explicit ParameterAdapter(Dart_Handle handle) |
| 603 { | 617 { |
| 604 setException(Dart_NewString("Not supported yet")); | 618 setException(Dart_NewString("Not supported yet")); |
| 605 } | 619 } |
| 606 operator Range::CompareHow() const { return this->value(); } | 620 operator Range::CompareHow() const { return this->value(); } |
| 607 }; | 621 }; |
| 608 | 622 |
| 609 } | 623 } |
| 610 | 624 |
| 611 #endif // DartDOMWrapper_h | 625 #endif // DartDOMWrapper_h |
| OLD | NEW |