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

Side by Side Diff: Source/core/inspector/CodeGeneratorInspectorStrings.py

Issue 884753003: Fix template angle bracket syntax in inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some more fixes Created 5 years, 10 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
OLDNEW
1 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 void addItem(PassRefPtr<T> value) 595 void addItem(PassRefPtr<T> value)
596 { 596 {
597 ArrayItemHelper<T>::Traits::pushRefPtr(this->openAccessors(), value); 597 ArrayItemHelper<T>::Traits::pushRefPtr(this->openAccessors(), value);
598 } 598 }
599 599
600 void addItem(T value) 600 void addItem(T value)
601 { 601 {
602 ArrayItemHelper<T>::Traits::pushRaw(this->openAccessors(), value); 602 ArrayItemHelper<T>::Traits::pushRaw(this->openAccessors(), value);
603 } 603 }
604 604
605 static PassRefPtr<Array<T> > create() 605 static PassRefPtr<Array<T>> create()
606 { 606 {
607 return adoptRef(new Array<T>()); 607 return adoptRef(new Array<T>());
608 } 608 }
609 609
610 static PassRefPtr<Array<T> > runtimeCast(PassRefPtr<JSONValue> value) 610 static PassRefPtr<Array<T>> runtimeCast(PassRefPtr<JSONValue> value)
611 { 611 {
612 RefPtr<JSONArray> array; 612 RefPtr<JSONArray> array;
613 bool castRes = value->asArray(&array); 613 bool castRes = value->asArray(&array);
614 ASSERT_UNUSED(castRes, castRes); 614 ASSERT_UNUSED(castRes, castRes);
615 #if $validatorIfdefName 615 #if $validatorIfdefName
616 assertCorrectValue(array.get()); 616 assertCorrectValue(array.get());
617 #endif // $validatorIfdefName 617 #endif // $validatorIfdefName
618 static_assert(sizeof(Array<T>) == sizeof(JSONArray), "Array<T> should be the same size as JSONArray"); 618 static_assert(sizeof(Array<T>) == sizeof(JSONArray), "Array<T> should be the same size as JSONArray");
619 return static_cast<Array<T>*>(static_cast<JSONArrayBase*>(array.get())); 619 return static_cast<Array<T>*>(static_cast<JSONArrayBase*>(array.get()));
620 } 620 }
621 621
622 void concat(PassRefPtr<Array<T> > array) 622 void concat(PassRefPtr<Array<T>> array)
623 { 623 {
624 return ArrayItemHelper<T>::Traits::concat(this->openAccessors(), array-> openAccessors()); 624 return ArrayItemHelper<T>::Traits::concat(this->openAccessors(), array-> openAccessors());
625 } 625 }
626 626
627 #if $validatorIfdefName 627 #if $validatorIfdefName
628 static void assertCorrectValue(JSONValue* value) 628 static void assertCorrectValue(JSONValue* value)
629 { 629 {
630 RefPtr<JSONArray> array; 630 RefPtr<JSONArray> array;
631 bool castRes = value->asArray(&array); 631 bool castRes = value->asArray(&array);
632 ASSERT_UNUSED(castRes, castRes); 632 ASSERT_UNUSED(castRes, castRes);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 #if $validatorIfdefName 770 #if $validatorIfdefName
771 template<typename T> 771 template<typename T>
772 static void assertCorrectValue(JSONValue* value) { 772 static void assertCorrectValue(JSONValue* value) {
773 RuntimeCastHelper::assertType<JSONValue::TypeArray>(value); 773 RuntimeCastHelper::assertType<JSONValue::TypeArray>(value);
774 } 774 }
775 #endif // $validatorIfdefName 775 #endif // $validatorIfdefName
776 }; 776 };
777 }; 777 };
778 778
779 template<typename T> 779 template<typename T>
780 struct ArrayItemHelper<TypeBuilder::Array<T> > { 780 struct ArrayItemHelper<TypeBuilder::Array<T>> {
781 struct Traits { 781 struct Traits {
782 static void pushRefPtr(JSONArray* array, PassRefPtr<TypeBuilder::Array<T > > value) 782 static void pushRefPtr(JSONArray* array, PassRefPtr<TypeBuilder::Array<T >> value)
783 { 783 {
784 array->pushValue(value); 784 array->pushValue(value);
785 } 785 }
786 786
787 #if $validatorIfdefName 787 #if $validatorIfdefName
788 template<typename S> 788 template<typename S>
789 static void assertCorrectValue(JSONValue* value) { 789 static void assertCorrectValue(JSONValue* value) {
790 S::assertCorrectValue(value); 790 S::assertCorrectValue(value);
791 } 791 }
792 #endif // $validatorIfdefName 792 #endif // $validatorIfdefName
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 }; 906 };
907 907
908 """) 908 """)
909 909
910 class_binding_builder_part_4 = ( 910 class_binding_builder_part_4 = (
911 """ static Builder<NoFieldsSet> create() 911 """ static Builder<NoFieldsSet> create()
912 { 912 {
913 return Builder<NoFieldsSet>(JSONObject::create()); 913 return Builder<NoFieldsSet>(JSONObject::create());
914 } 914 }
915 """) 915 """)
OLDNEW
« no previous file with comments | « Source/core/inspector/CodeGeneratorInspector.py ('k') | Source/core/inspector/ConsoleMessageStorage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698