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

Side by Side Diff: Source/bindings/dart/DartDOMWrapper.h

Issue 27769002: Fixing custom element type extensions to have correct native type (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/bindings/dart/DartCustomElementWrapper.cpp ('k') | Source/bindings/dart/DartUtilities.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 { 305 {
306 typedef DartDOMWrapperTraits<BindingsClass> Traits; 306 typedef DartDOMWrapperTraits<BindingsClass> Traits;
307 307
308 Dart_WeakPersistentHandle wrapper = Traits::MapTraits::domMap(domData)-> get(domObject); 308 Dart_WeakPersistentHandle wrapper = Traits::MapTraits::domMap(domData)-> get(domObject);
309 ASSERT(Dart_IdentityEquals(Dart_HandleFromWeakPersistent(wrapper), oldIn stance)); 309 ASSERT(Dart_IdentityEquals(Dart_HandleFromWeakPersistent(wrapper), oldIn stance));
310 Traits::MapTraits::domMap(domData)->remove(domObject); 310 Traits::MapTraits::domMap(domData)->remove(domObject);
311 Traits::ActiveTraits::removeWrapper(domData, domObject); 311 Traits::ActiveTraits::removeWrapper(domData, domObject);
312 Traits::EventTargetTraits::removeWrapper(domData, domObject); 312 Traits::EventTargetTraits::removeWrapper(domData, domObject);
313 } 313 }
314 314
315 friend class DartCustomElementConstructorBuilder;
315 friend class DartCustomElementWrapper<HTMLElement>; 316 friend class DartCustomElementWrapper<HTMLElement>;
316 friend class DartUtilities; 317 friend class DartUtilities;
317 }; 318 };
318 319
319 template<bool isNode> 320 template<bool isNode>
320 struct DartDOMWrapperMapTraits { }; 321 struct DartDOMWrapperMapTraits { };
321 322
322 template<> 323 template<>
323 struct DartDOMWrapperMapTraits<false> { 324 struct DartDOMWrapperMapTraits<false> {
324 static DartDOMObjectMap* domMap(DartDOMData* domData) { return domData->obje ctMap(); } 325 static DartDOMObjectMap* domMap(DartDOMData* domData) { return domData->obje ctMap(); }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 static DartMessagePortMap* domMap(DartDOMData* domData) { return domData ->messagePortMap(); } 391 static DartMessagePortMap* domMap(DartDOMData* domData) { return domData ->messagePortMap(); }
391 }; 392 };
392 typedef MessagePortMapTraits MapTraits; 393 typedef MessagePortMapTraits MapTraits;
393 typedef DartDOMWrapperActiveTraits<DartMessagePort, false> ActiveTraits; 394 typedef DartDOMWrapperActiveTraits<DartMessagePort, false> ActiveTraits;
394 typedef DartDOMWrapperEventTargetTraits<DartMessagePort, true> EventTargetTr aits; 395 typedef DartDOMWrapperEventTargetTraits<DartMessagePort, true> EventTargetTr aits;
395 }; 396 };
396 397
397 } 398 }
398 399
399 #endif // DartDOMWrapper_h 400 #endif // DartDOMWrapper_h
OLDNEW
« no previous file with comments | « Source/bindings/dart/DartCustomElementWrapper.cpp ('k') | Source/bindings/dart/DartUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698