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

Side by Side Diff: public/platform/WebWorkerRunLoop.h

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « public/platform/WebTeleporter.h ('k') | public/web/WebViewClient.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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 11 matching lines...) Expand all
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24 24
25 #ifndef WebWorkerRunLoop_h 25 #ifndef WebWorkerRunLoop_h
26 #define WebWorkerRunLoop_h 26 #define WebWorkerRunLoop_h
27 27
28 #include "WebCommon.h" 28 #include "WebCommon.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class WebTeleporter;
32 class WorkerThread; 33 class WorkerThread;
33 34
34 class WebWorkerRunLoop { 35 class WebWorkerRunLoop {
35 public: 36 public:
36 class Task { 37 class Task {
37 public: 38 public:
38 virtual ~Task() { } 39 virtual ~Task() { }
39 virtual void Run() = 0; 40 virtual void Run() = 0;
40 }; 41 };
41 42
42 // Returns true if the task was posted to a non-terminated loop. 43 // Returns true if the task was posted to a non-terminated loop.
43 BLINK_EXPORT bool postTask(Task*); 44 BLINK_EXPORT bool postTask(Task*);
44 BLINK_EXPORT bool equals(const WebWorkerRunLoop&) const; 45 BLINK_EXPORT bool equals(const WebWorkerRunLoop&) const;
45 BLINK_EXPORT bool lessThan(const WebWorkerRunLoop&) const; 46 BLINK_EXPORT bool lessThan(const WebWorkerRunLoop&) const;
46 47
48 BLINK_EXPORT void setTeleporter(WebTeleporter*) const;
49
50 BLINK_EXPORT int compositorId() const;
51
47 #if BLINK_IMPLEMENTATION 52 #if BLINK_IMPLEMENTATION
48 WebWorkerRunLoop(WorkerThread*); 53 WebWorkerRunLoop(WorkerThread*);
49 #endif 54 #endif
55 WebWorkerRunLoop() {} // TODO this is probably bad
50 56
51 private: 57 private:
52 WorkerThread* m_workerThread; 58 WorkerThread* m_workerThread;
53 }; 59 };
54 60
55 inline bool operator==(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b) 61 inline bool operator==(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
56 { 62 {
57 return a.equals(b); 63 return a.equals(b);
58 } 64 }
59 65
60 inline bool operator<(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b) 66 inline bool operator<(const WebWorkerRunLoop& a, const WebWorkerRunLoop& b)
61 { 67 {
62 return a.lessThan(b); 68 return a.lessThan(b);
63 } 69 }
64 70
65 } 71 }
66 72
67 #endif 73 #endif
OLDNEW
« no previous file with comments | « public/platform/WebTeleporter.h ('k') | public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698