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/web/WorkerAllowMainThreadBridgeBase.h

Issue 50773002: Introduce WebWorkerPermissionClientProxy to deprecate WorkerAllowMainThreadBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated comments, minor code fix Created 7 years, 1 month 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/web/WebWorkerClientImpl.cpp ('k') | Source/web/WorkerFileSystemClient.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) 2010, 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "WebWorkerBase.h" 31 #include "WebWorkerBase.h"
32 #include "core/dom/CrossThreadTask.h" 32 #include "core/dom/CrossThreadTask.h"
33 #include "core/workers/WorkerGlobalScope.h" 33 #include "core/workers/WorkerGlobalScope.h"
34 #include "platform/CrossThreadCopier.h" 34 #include "platform/CrossThreadCopier.h"
35 35
36 namespace WebKit { 36 namespace WebKit {
37 37
38 // FIXME: Deprecate this bridge code when PermissionClientProxy is implemented
39 // by the embedder.
38 // Base class for worker thread bridges. This class adds an observer to 40 // Base class for worker thread bridges. This class adds an observer to
39 // WorkerGlobalScope so that it doesn't try to use deleted pointers when 41 // WorkerGlobalScope so that it doesn't try to use deleted pointers when
40 // WorkerGlobalScope is destroyed. 42 // WorkerGlobalScope is destroyed.
41 class WorkerAllowMainThreadBridgeBase : public ThreadSafeRefCounted<WorkerAllowM ainThreadBridgeBase> { 43 class WorkerAllowMainThreadBridgeBase : public ThreadSafeRefCounted<WorkerAllowM ainThreadBridgeBase> {
42 WTF_MAKE_NONCOPYABLE(WorkerAllowMainThreadBridgeBase); 44 WTF_MAKE_NONCOPYABLE(WorkerAllowMainThreadBridgeBase);
43 public: 45 public:
44 WorkerAllowMainThreadBridgeBase(WebCore::WorkerGlobalScope*, WebWorkerBase*) ; 46 WorkerAllowMainThreadBridgeBase(WebCore::WorkerGlobalScope*, WebWorkerBase*) ;
45 47
46 virtual ~WorkerAllowMainThreadBridgeBase() 48 virtual ~WorkerAllowMainThreadBridgeBase()
47 { 49 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 static void allowTask(WebCore::ExecutionContext*, PassOwnPtr<AllowParams>, P assRefPtr<WorkerAllowMainThreadBridgeBase>); 86 static void allowTask(WebCore::ExecutionContext*, PassOwnPtr<AllowParams>, P assRefPtr<WorkerAllowMainThreadBridgeBase>);
85 static void didComplete(WebCore::ExecutionContext*, PassRefPtr<WorkerAllowMa inThreadBridgeBase>, bool); 87 static void didComplete(WebCore::ExecutionContext*, PassRefPtr<WorkerAllowMa inThreadBridgeBase>, bool);
86 88
87 Mutex m_mutex; 89 Mutex m_mutex;
88 WebWorkerBase* m_webWorkerBase; 90 WebWorkerBase* m_webWorkerBase;
89 OwnPtr<WebCore::WorkerGlobalScope::Observer> m_workerGlobalScopeObserver; 91 OwnPtr<WebCore::WorkerGlobalScope::Observer> m_workerGlobalScopeObserver;
90 bool m_result; 92 bool m_result;
91 }; 93 };
92 94
93 } // namespace WebKit 95 } // namespace WebKit
94
OLDNEW
« no previous file with comments | « Source/web/WebWorkerClientImpl.cpp ('k') | Source/web/WorkerFileSystemClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698