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

Side by Side Diff: sky/engine/wtf/MainThread.h

Issue 684813003: Remove wtf/Functional.h (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/wtf/FunctionalTest.cpp ('k') | sky/engine/wtf/MainThread.cpp » ('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) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 namespace WTF { 37 namespace WTF {
38 38
39 typedef uint32_t ThreadIdentifier; 39 typedef uint32_t ThreadIdentifier;
40 typedef void MainThreadFunction(void*); 40 typedef void MainThreadFunction(void*);
41 41
42 // Must be called from the main thread. 42 // Must be called from the main thread.
43 WTF_EXPORT void initializeMainThread(void (*)(MainThreadFunction, void*)); 43 WTF_EXPORT void initializeMainThread(void (*)(MainThreadFunction, void*));
44 44
45 WTF_EXPORT void callOnMainThread(MainThreadFunction*, void* context); 45 WTF_EXPORT void callOnMainThread(MainThreadFunction*, void* context);
46 46
47 template<typename> class Function;
48 WTF_EXPORT void callOnMainThread(const Function<void ()>&);
49
50 WTF_EXPORT bool isMainThread(); 47 WTF_EXPORT bool isMainThread();
51 48
52 } // namespace WTF 49 } // namespace WTF
53 50
54 using WTF::callOnMainThread; 51 using WTF::callOnMainThread;
55 using WTF::isMainThread; 52 using WTF::isMainThread;
56 #endif // MainThread_h 53 #endif // MainThread_h
OLDNEW
« no previous file with comments | « sky/engine/wtf/FunctionalTest.cpp ('k') | sky/engine/wtf/MainThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698