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

Side by Side Diff: Source/core/dom/ActiveDOMObject.cpp

Issue 401603003: Remove ActiveDOMObject::{,un}setPendingActivity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ActiveDOMObject.h ('k') | no next file » | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 15 matching lines...) Expand all
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/dom/ActiveDOMObject.h" 28 #include "core/dom/ActiveDOMObject.h"
29 29
30 #include "core/dom/ExecutionContext.h" 30 #include "core/dom/ExecutionContext.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 ActiveDOMObject::ActiveDOMObject(ExecutionContext* executionContext) 34 ActiveDOMObject::ActiveDOMObject(ExecutionContext* executionContext)
35 : ContextLifecycleObserver(executionContext, ActiveDOMObjectType) 35 : ContextLifecycleObserver(executionContext, ActiveDOMObjectType)
36 , m_pendingActivityCount(0)
37 #if ENABLE(ASSERT) 36 #if ENABLE(ASSERT)
38 , m_suspendIfNeededCalled(false) 37 , m_suspendIfNeededCalled(false)
39 #endif 38 #endif
40 { 39 {
41 ASSERT(!executionContext || executionContext->isContextThread()); 40 ASSERT(!executionContext || executionContext->isContextThread());
42 } 41 }
43 42
44 ActiveDOMObject::~ActiveDOMObject() 43 ActiveDOMObject::~ActiveDOMObject()
45 { 44 {
46 // ActiveDOMObject may be inherited by a sub-class whose life-cycle 45 // ActiveDOMObject may be inherited by a sub-class whose life-cycle
(...skipping 14 matching lines...) Expand all
61 #if ENABLE(ASSERT) 60 #if ENABLE(ASSERT)
62 ASSERT(!m_suspendIfNeededCalled); 61 ASSERT(!m_suspendIfNeededCalled);
63 m_suspendIfNeededCalled = true; 62 m_suspendIfNeededCalled = true;
64 #endif 63 #endif
65 if (ExecutionContext* context = executionContext()) 64 if (ExecutionContext* context = executionContext())
66 context->suspendActiveDOMObjectIfNeeded(this); 65 context->suspendActiveDOMObjectIfNeeded(this);
67 } 66 }
68 67
69 bool ActiveDOMObject::hasPendingActivity() const 68 bool ActiveDOMObject::hasPendingActivity() const
70 { 69 {
71 return m_pendingActivityCount; 70 return false;
72 } 71 }
73 72
74 void ActiveDOMObject::suspend() 73 void ActiveDOMObject::suspend()
75 { 74 {
76 } 75 }
77 76
78 void ActiveDOMObject::resume() 77 void ActiveDOMObject::resume()
79 { 78 {
80 } 79 }
81 80
(...skipping 12 matching lines...) Expand all
94 93
95 if (context->activeDOMObjectsAreSuspended()) { 94 if (context->activeDOMObjectsAreSuspended()) {
96 suspend(); 95 suspend();
97 return; 96 return;
98 } 97 }
99 98
100 resume(); 99 resume();
101 } 100 }
102 101
103 } // namespace WebCore 102 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ActiveDOMObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698