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

Side by Side Diff: third_party/WebKit/Source/platform/CrossThreadFunctional.h

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CrossThreadFunctional_h 5 #ifndef CrossThreadFunctional_h
6 #define CrossThreadFunctional_h 6 #define CrossThreadFunctional_h
7 7
8 #include <type_traits> 8 #include <type_traits>
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "platform/CrossThreadCopier.h" 10 #include "platform/CrossThreadCopier.h"
(...skipping 15 matching lines...) Expand all
26 // 26 //
27 // Don't (if you pass the task across threads): 27 // Don't (if you pass the task across threads):
28 // bind(func1, 42, str); 28 // bind(func1, 42, str);
29 // bind(func1, 42, str.isolatedCopy()); 29 // bind(func1, 42, str.isolatedCopy());
30 30
31 template <typename FunctionType, typename... Ps> 31 template <typename FunctionType, typename... Ps>
32 std::unique_ptr<Function<base::MakeUnboundRunType<FunctionType, Ps...>, 32 std::unique_ptr<Function<base::MakeUnboundRunType<FunctionType, Ps...>,
33 WTF::CrossThreadAffinity>> 33 WTF::CrossThreadAffinity>>
34 crossThreadBind(FunctionType function, Ps&&... parameters) { 34 crossThreadBind(FunctionType function, Ps&&... parameters) {
35 return WTF::bindInternal<WTF::CrossThreadAffinity>( 35 return WTF::bindInternal<WTF::CrossThreadAffinity>(
36 function, CrossThreadCopier<typename std::decay<Ps>::type>::copy( 36 function,
37 std::forward<Ps>(parameters))...); 37 CrossThreadCopier<typename std::decay<Ps>::type>::copy(
38 std::forward<Ps>(parameters))...);
38 } 39 }
39 40
40 } // namespace blink 41 } // namespace blink
41 42
42 #endif // CrossThreadFunctional_h 43 #endif // CrossThreadFunctional_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USB.cpp ('k') | third_party/WebKit/Source/platform/DecimalTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698