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

Side by Side Diff: Source/wtf/Functional.h

Issue 835953003: Fix template angle bracket syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/wtf/DequeTest.cpp ('k') | Source/wtf/HashCountedSet.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 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 R(C::*m_function)(P...); 92 R(C::*m_function)(P...);
93 }; 93 };
94 94
95 template<typename T> struct ParamStorageTraits { 95 template<typename T> struct ParamStorageTraits {
96 typedef T StorageType; 96 typedef T StorageType;
97 97
98 static StorageType wrap(const T& value) { return value; } 98 static StorageType wrap(const T& value) { return value; }
99 static const T& unwrap(const StorageType& value) { return value; } 99 static const T& unwrap(const StorageType& value) { return value; }
100 }; 100 };
101 101
102 template<typename T> struct ParamStorageTraits<PassRefPtr<T> > { 102 template<typename T> struct ParamStorageTraits<PassRefPtr<T>> {
103 typedef RefPtr<T> StorageType; 103 typedef RefPtr<T> StorageType;
104 104
105 static StorageType wrap(PassRefPtr<T> value) { return value; } 105 static StorageType wrap(PassRefPtr<T> value) { return value; }
106 static T* unwrap(const StorageType& value) { return value.get(); } 106 static T* unwrap(const StorageType& value) { return value.get(); }
107 }; 107 };
108 108
109 template<typename T> struct ParamStorageTraits<RefPtr<T> > { 109 template<typename T> struct ParamStorageTraits<RefPtr<T>> {
110 typedef RefPtr<T> StorageType; 110 typedef RefPtr<T> StorageType;
111 111
112 static StorageType wrap(RefPtr<T> value) { return value.release(); } 112 static StorageType wrap(RefPtr<T> value) { return value.release(); }
113 static T* unwrap(const StorageType& value) { return value.get(); } 113 static T* unwrap(const StorageType& value) { return value.get(); }
114 }; 114 };
115 115
116 template<typename> class RetainPtr; 116 template<typename> class RetainPtr;
117 117
118 template<typename T> struct ParamStorageTraits<RetainPtr<T> > { 118 template<typename T> struct ParamStorageTraits<RetainPtr<T>> {
119 typedef RetainPtr<T> StorageType; 119 typedef RetainPtr<T> StorageType;
120 120
121 static StorageType wrap(const RetainPtr<T>& value) { return value; } 121 static StorageType wrap(const RetainPtr<T>& value) { return value; }
122 static typename RetainPtr<T>::PtrType unwrap(const StorageType& value) { ret urn value.get(); } 122 static typename RetainPtr<T>::PtrType unwrap(const StorageType& value) { ret urn value.get(); }
123 }; 123 };
124 124
125 class FunctionImplBase : public ThreadSafeRefCounted<FunctionImplBase> { 125 class FunctionImplBase : public ThreadSafeRefCounted<FunctionImplBase> {
126 public: 126 public:
127 virtual ~FunctionImplBase() { } 127 virtual ~FunctionImplBase() { }
128 }; 128 };
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 566
567 typedef Function<void()> Closure; 567 typedef Function<void()> Closure;
568 568
569 } 569 }
570 570
571 using WTF::Function; 571 using WTF::Function;
572 using WTF::bind; 572 using WTF::bind;
573 using WTF::Closure; 573 using WTF::Closure;
574 574
575 #endif // WTF_Functional_h 575 #endif // WTF_Functional_h
OLDNEW
« no previous file with comments | « Source/wtf/DequeTest.cpp ('k') | Source/wtf/HashCountedSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698