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

Side by Side Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp

Issue 1133713008: [WIP] Migrate hasPendingActivity from ActiveDOMObject to ScriptWrappable. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review Comments Created 5 years, 2 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Disentangle the port in preparation for sending it to the remote context. 69 // Disentangle the port in preparation for sending it to the remote context.
70 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(con text, ports, exceptionState); 70 OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(con text, ports, exceptionState);
71 if (exceptionState.hadException()) 71 if (exceptionState.hadException())
72 return; 72 return;
73 thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.re lease()); 73 thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.re lease());
74 } 74 }
75 75
76 void DedicatedWorkerGlobalScope::importScripts(const Vector<String>& urls, Excep tionState& exceptionState) 76 void DedicatedWorkerGlobalScope::importScripts(const Vector<String>& urls, Excep tionState& exceptionState)
77 { 77 {
78 Base::importScripts(urls, exceptionState); 78 Base::importScripts(urls, exceptionState);
79 thread()->workerObjectProxy().reportPendingActivity(hasPendingActivity());
80 } 79 }
81 80
82 DedicatedWorkerThread* DedicatedWorkerGlobalScope::thread() const 81 DedicatedWorkerThread* DedicatedWorkerGlobalScope::thread() const
83 { 82 {
84 return static_cast<DedicatedWorkerThread*>(Base::thread()); 83 return static_cast<DedicatedWorkerThread*>(Base::thread());
85 } 84 }
86 85
87 class UseCounterTask : public ExecutionContextTask { 86 class UseCounterTask : public ExecutionContextTask {
88 public: 87 public:
89 static PassOwnPtr<UseCounterTask> createCount(UseCounter::Feature feature) { return adoptPtr(new UseCounterTask(feature, false)); } 88 static PassOwnPtr<UseCounterTask> createCount(UseCounter::Feature feature) { return adoptPtr(new UseCounterTask(feature, false)); }
(...skipping 28 matching lines...) Expand all
118 { 117 {
119 thread()->workerObjectProxy().postTaskToMainExecutionContext(UseCounterTask: :createDeprecation(feature)); 118 thread()->workerObjectProxy().postTaskToMainExecutionContext(UseCounterTask: :createDeprecation(feature));
120 } 119 }
121 120
122 DEFINE_TRACE(DedicatedWorkerGlobalScope) 121 DEFINE_TRACE(DedicatedWorkerGlobalScope)
123 { 122 {
124 WorkerGlobalScope::trace(visitor); 123 WorkerGlobalScope::trace(visitor);
125 } 124 }
126 125
127 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698