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

Side by Side Diff: Source/WebCore/workers/WorkerRunLoop.h

Issue 12096050: Merge 140483 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 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
« no previous file with comments | « Source/WTF/wtf/MessageQueue.h ('k') | Source/WebCore/workers/WorkerRunLoop.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 enum WaitMode { WaitForMessage, DontWaitForMessage }; 55 enum WaitMode { WaitForMessage, DontWaitForMessage };
56 56
57 // Waits for a single task and returns. 57 // Waits for a single task and returns.
58 MessageQueueWaitResult runInMode(WorkerContext*, const String& mode, Wai tMode = WaitForMessage); 58 MessageQueueWaitResult runInMode(WorkerContext*, const String& mode, Wai tMode = WaitForMessage);
59 59
60 void terminate(); 60 void terminate();
61 bool terminated() const { return m_messageQueue.killed(); } 61 bool terminated() const { return m_messageQueue.killed(); }
62 62
63 void postTask(PassOwnPtr<ScriptExecutionContext::Task>); 63 void postTask(PassOwnPtr<ScriptExecutionContext::Task>);
64 void postTaskAndTerminate(PassOwnPtr<ScriptExecutionContext::Task>);
64 void postTaskForMode(PassOwnPtr<ScriptExecutionContext::Task>, const Str ing& mode); 65 void postTaskForMode(PassOwnPtr<ScriptExecutionContext::Task>, const Str ing& mode);
65 66
66 unsigned long createUniqueId() { return ++m_uniqueId; } 67 unsigned long createUniqueId() { return ++m_uniqueId; }
67 68
68 static String defaultMode(); 69 static String defaultMode();
69 70
70 class Task { 71 class Task {
71 WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED; 72 WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED;
72 public: 73 public:
73 static PassOwnPtr<Task> create(PassOwnPtr<ScriptExecutionContext::Ta sk> task, const String& mode); 74 static PassOwnPtr<Task> create(PassOwnPtr<ScriptExecutionContext::Ta sk> task, const String& mode);
(...skipping 20 matching lines...) Expand all
94 OwnPtr<WorkerSharedTimer> m_sharedTimer; 95 OwnPtr<WorkerSharedTimer> m_sharedTimer;
95 int m_nestedCount; 96 int m_nestedCount;
96 unsigned long m_uniqueId; 97 unsigned long m_uniqueId;
97 }; 98 };
98 99
99 } // namespace WebCore 100 } // namespace WebCore
100 101
101 #endif // ENABLE(WORKERS) 102 #endif // ENABLE(WORKERS)
102 103
103 #endif // WorkerRunLoop_h 104 #endif // WorkerRunLoop_h
OLDNEW
« no previous file with comments | « Source/WTF/wtf/MessageQueue.h ('k') | Source/WebCore/workers/WorkerRunLoop.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698