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

Side by Side Diff: Source/web/ServiceWorkerGlobalScopeProxy.h

Issue 1115923002: workers: Rename WorkerThread to WorkerScript. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // This class is created and destructed on the main thread, but live most 50 // This class is created and destructed on the main thread, but live most
51 // of its time as a resident of the worker thread. 51 // of its time as a resident of the worker thread.
52 // All methods other than its ctor/dtor are called on the worker thread. 52 // All methods other than its ctor/dtor are called on the worker thread.
53 // 53 //
54 // This implements WebServiceWorkerContextProxy, which connects ServiceWorker's 54 // This implements WebServiceWorkerContextProxy, which connects ServiceWorker's
55 // WorkerGlobalScope and embedder/chrome, and implements ServiceWorker-specific 55 // WorkerGlobalScope and embedder/chrome, and implements ServiceWorker-specific
56 // events/upcall methods that are to be called by embedder/chromium, 56 // events/upcall methods that are to be called by embedder/chromium,
57 // e.g. onfetch. 57 // e.g. onfetch.
58 // 58 //
59 // An instance of this class is supposed to outlive until 59 // An instance of this class is supposed to outlive until
60 // workerThreadTerminated() is called by its corresponding 60 // workerScriptTerminated() is called by its corresponding
61 // WorkerGlobalScope. 61 // WorkerGlobalScope.
62 class ServiceWorkerGlobalScopeProxy final 62 class ServiceWorkerGlobalScopeProxy final
63 : public WebServiceWorkerContextProxy 63 : public WebServiceWorkerContextProxy
64 , public WorkerReportingProxy { 64 , public WorkerReportingProxy {
65 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy); 65 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy);
66 public: 66 public:
67 static PassOwnPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImp l&, Document&, WebServiceWorkerContextClient&); 67 static PassOwnPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImp l&, Document&, WebServiceWorkerContextClient&);
68 virtual ~ServiceWorkerGlobalScopeProxy(); 68 virtual ~ServiceWorkerGlobalScopeProxy();
69 69
70 // WebServiceWorkerContextProxy overrides: 70 // WebServiceWorkerContextProxy overrides:
(...skipping 11 matching lines...) Expand all
82 82
83 // WorkerReportingProxy overrides: 83 // WorkerReportingProxy overrides:
84 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int exceptionId) override; 84 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int exceptionId) override;
85 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride; 85 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride;
86 virtual void postMessageToPageInspector(const String&) override; 86 virtual void postMessageToPageInspector(const String&) override;
87 virtual void postWorkerConsoleAgentEnabled() override { } 87 virtual void postWorkerConsoleAgentEnabled() override { }
88 virtual void didEvaluateWorkerScript(bool success) override; 88 virtual void didEvaluateWorkerScript(bool success) override;
89 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override; 89 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override;
90 virtual void workerGlobalScopeClosed() override; 90 virtual void workerGlobalScopeClosed() override;
91 virtual void willDestroyWorkerGlobalScope() override; 91 virtual void willDestroyWorkerGlobalScope() override;
92 virtual void workerThreadTerminated() override; 92 virtual void workerScriptTerminated() override;
93 93
94 private: 94 private:
95 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&); 95 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&);
96 96
97 WebEmbeddedWorkerImpl& m_embeddedWorker; 97 WebEmbeddedWorkerImpl& m_embeddedWorker;
98 Document& m_document; 98 Document& m_document;
99 99
100 WebServiceWorkerContextClient& m_client; 100 WebServiceWorkerContextClient& m_client;
101 101
102 ServiceWorkerGlobalScope* m_workerGlobalScope; 102 ServiceWorkerGlobalScope* m_workerGlobalScope;
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // ServiceWorkerGlobalScopeProxy_h 107 #endif // ServiceWorkerGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698