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

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

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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 /* 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return; 61 return;
62 } 62 }
63 63
64 // FIXME: runAsync should take a TraceLocation and pass it to timer here. 64 // FIXME: runAsync should take a TraceLocation and pass it to timer here.
65 if (!m_timer.isActive()) 65 if (!m_timer.isActive())
66 m_timer.startOneShot(0, BLINK_FROM_HERE); 66 m_timer.startOneShot(0, BLINK_FROM_HERE);
67 } 67 }
68 68
69 // If it's scheduled to run the method, cancel it and remember to schedule 69 // If it's scheduled to run the method, cancel it and remember to schedule
70 // it again when resume() is called. Mainly for implementing 70 // it again when resume() is called. Mainly for implementing
71 // ActiveDOMObject::suspend(). 71 // SuspendableObject::suspend().
72 void suspend() { 72 void suspend() {
73 if (m_suspended) 73 if (m_suspended)
74 return; 74 return;
75 m_suspended = true; 75 m_suspended = true;
76 76
77 if (!m_timer.isActive()) 77 if (!m_timer.isActive())
78 return; 78 return;
79 79
80 m_timer.stop(); 80 m_timer.stop();
81 m_runWhenResumed = true; 81 m_runWhenResumed = true;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 Member<TargetClass> m_object; 126 Member<TargetClass> m_object;
127 TargetMethod m_method; 127 TargetMethod m_method;
128 128
129 bool m_suspended; 129 bool m_suspended;
130 bool m_runWhenResumed; 130 bool m_runWhenResumed;
131 }; 131 };
132 132
133 } // namespace blink 133 } // namespace blink
134 134
135 #endif 135 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698