OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void resume(); | 58 void resume(); |
59 | 59 |
60 private: | 60 private: |
61 explicit MainThreadTaskRunner(ExecutionContext*); | 61 explicit MainThreadTaskRunner(ExecutionContext*); |
62 | 62 |
63 void pendingTasksTimerFired(Timer<MainThreadTaskRunner>*); | 63 void pendingTasksTimerFired(Timer<MainThreadTaskRunner>*); |
64 | 64 |
65 ExecutionContext* m_context; | 65 ExecutionContext* m_context; |
66 WeakPtrFactory<MainThreadTaskRunner> m_weakFactory; | 66 WeakPtrFactory<MainThreadTaskRunner> m_weakFactory; |
67 Timer<MainThreadTaskRunner> m_pendingTasksTimer; | 67 Timer<MainThreadTaskRunner> m_pendingTasksTimer; |
68 Vector<OwnPtr<ExecutionContextTask> > m_pendingTasks; | 68 Vector<OwnPtr<ExecutionContextTask>> m_pendingTasks; |
69 bool m_suspended; | 69 bool m_suspended; |
70 }; | 70 }; |
71 | 71 |
72 inline PassOwnPtr<MainThreadTaskRunner> MainThreadTaskRunner::create(ExecutionCo
ntext* context) | 72 inline PassOwnPtr<MainThreadTaskRunner> MainThreadTaskRunner::create(ExecutionCo
ntext* context) |
73 { | 73 { |
74 return adoptPtr(new MainThreadTaskRunner(context)); | 74 return adoptPtr(new MainThreadTaskRunner(context)); |
75 } | 75 } |
76 | 76 |
77 } // namespace | 77 } // namespace |
78 | 78 |
79 #endif | 79 #endif |
OLD | NEW |