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

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

Issue 383063008: Expose the ServiceWorker's v8 context to embedders. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Remove an unused v8::Isolate forward decl (but should the Proxy expose an Isolate?) 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
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 19 matching lines...) Expand all
30 30
31 #ifndef WebEmbeddedWorkerImpl_h 31 #ifndef WebEmbeddedWorkerImpl_h
32 #define WebEmbeddedWorkerImpl_h 32 #define WebEmbeddedWorkerImpl_h
33 33
34 #include "public/web/WebContentSecurityPolicy.h" 34 #include "public/web/WebContentSecurityPolicy.h"
35 #include "public/web/WebEmbeddedWorker.h" 35 #include "public/web/WebEmbeddedWorker.h"
36 #include "public/web/WebEmbeddedWorkerStartData.h" 36 #include "public/web/WebEmbeddedWorkerStartData.h"
37 #include "public/web/WebFrameClient.h" 37 #include "public/web/WebFrameClient.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 class ExecutionContextTask;
40 class WorkerScriptLoader; 41 class WorkerScriptLoader;
41 class WorkerThread; 42 class WorkerThread;
42 } 43 }
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class ServiceWorkerGlobalScopeProxy; 47 class ServiceWorkerGlobalScopeProxy;
47 class WebServiceWorkerNetworkProvider; 48 class WebServiceWorkerNetworkProvider;
48 class WebView; 49 class WebView;
49 50
50 class WebEmbeddedWorkerImpl FINAL : 51 class WebEmbeddedWorkerImpl FINAL :
51 public WebEmbeddedWorker, 52 public WebEmbeddedWorker,
52 public WebFrameClient { 53 public WebFrameClient {
53 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl); 54 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl);
54 public: 55 public:
55 WebEmbeddedWorkerImpl( 56 WebEmbeddedWorkerImpl(
56 PassOwnPtr<WebServiceWorkerContextClient>, 57 PassOwnPtr<WebServiceWorkerContextClient>,
57 PassOwnPtr<WebWorkerPermissionClientProxy>); 58 PassOwnPtr<WebWorkerPermissionClientProxy>);
58 virtual ~WebEmbeddedWorkerImpl(); 59 virtual ~WebEmbeddedWorkerImpl();
59 60
61 // Posts the task to the worker thread, where it can safely access the worke r's v8 context.
62 void postTask(PassOwnPtr<WebCore::ExecutionContextTask>);
63
60 // WebEmbeddedWorker overrides. 64 // WebEmbeddedWorker overrides.
61 virtual void startWorkerContext(const WebEmbeddedWorkerStartData&) OVERRIDE; 65 virtual void startWorkerContext(const WebEmbeddedWorkerStartData&) OVERRIDE;
62 virtual void resumeAfterDownload() OVERRIDE; 66 virtual void resumeAfterDownload() OVERRIDE;
63 virtual void terminateWorkerContext() OVERRIDE; 67 virtual void terminateWorkerContext() OVERRIDE;
64 virtual void resumeWorkerContext() OVERRIDE; 68 virtual void resumeWorkerContext() OVERRIDE;
65 virtual void attachDevTools() OVERRIDE; 69 virtual void attachDevTools() OVERRIDE;
66 virtual void reattachDevTools(const WebString& savedState) OVERRIDE; 70 virtual void reattachDevTools(const WebString& savedState) OVERRIDE;
67 virtual void detachDevTools() OVERRIDE; 71 virtual void detachDevTools() OVERRIDE;
68 virtual void dispatchDevToolsMessage(const WebString&) OVERRIDE; 72 virtual void dispatchDevToolsMessage(const WebString&) OVERRIDE;
69 73
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 enum { 118 enum {
115 DontPauseAfterDownload, 119 DontPauseAfterDownload,
116 DoPauseAfterDownload, 120 DoPauseAfterDownload,
117 IsPausedAfterDownload 121 IsPausedAfterDownload
118 } m_pauseAfterDownloadState; 122 } m_pauseAfterDownloadState;
119 }; 123 };
120 124
121 } // namespace blink 125 } // namespace blink
122 126
123 #endif // WebEmbeddedWorkerImpl_h 127 #endif // WebEmbeddedWorkerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698