OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 #include <memory> | 36 #include <memory> |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "public/platform/WebContentSecurityPolicy.h" | 38 #include "public/platform/WebContentSecurityPolicy.h" |
39 #include "public/web/WebDevToolsAgentClient.h" | 39 #include "public/web/WebDevToolsAgentClient.h" |
40 #include "public/web/WebEmbeddedWorker.h" | 40 #include "public/web/WebEmbeddedWorker.h" |
41 #include "public/web/WebEmbeddedWorkerStartData.h" | 41 #include "public/web/WebEmbeddedWorkerStartData.h" |
42 #include "public/web/WebFrameClient.h" | 42 #include "public/web/WebFrameClient.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
| 46 class ServiceWorkerGlobalScopeProxy; |
46 class ThreadableLoadingContext; | 47 class ThreadableLoadingContext; |
47 class ServiceWorkerGlobalScopeProxy; | |
48 class WebLocalFrameImpl; | 48 class WebLocalFrameImpl; |
49 class WebView; | 49 class WebView; |
50 class WorkerInspectorProxy; | 50 class WorkerInspectorProxy; |
51 class WorkerScriptLoader; | 51 class WorkerScriptLoader; |
| 52 class WorkerShadowFetchContext; |
52 class WorkerThread; | 53 class WorkerThread; |
53 | 54 |
54 class WebEmbeddedWorkerImpl final : public WebEmbeddedWorker, | 55 class WebEmbeddedWorkerImpl final : public WebEmbeddedWorker, |
55 public WebFrameClient, | 56 public WebFrameClient, |
56 public WebDevToolsAgentClient, | 57 public WebDevToolsAgentClient, |
57 private WorkerLoaderProxyProvider { | 58 private WorkerLoaderProxyProvider { |
58 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl); | 59 WTF_MAKE_NONCOPYABLE(WebEmbeddedWorkerImpl); |
59 | 60 |
60 public: | 61 public: |
61 WebEmbeddedWorkerImpl(std::unique_ptr<WebServiceWorkerContextClient>, | 62 WebEmbeddedWorkerImpl(std::unique_ptr<WebServiceWorkerContextClient>, |
(...skipping 11 matching lines...) Expand all Loading... |
73 void DetachDevTools() override; | 74 void DetachDevTools() override; |
74 void DispatchDevToolsMessage(int session_id, | 75 void DispatchDevToolsMessage(int session_id, |
75 int call_id, | 76 int call_id, |
76 const WebString& method, | 77 const WebString& method, |
77 const WebString& message) override; | 78 const WebString& message) override; |
78 void AddMessageToConsole(const WebConsoleMessage&) override; | 79 void AddMessageToConsole(const WebConsoleMessage&) override; |
79 | 80 |
80 void PostMessageToPageInspector(const WTF::String&); | 81 void PostMessageToPageInspector(const WTF::String&); |
81 | 82 |
82 private: | 83 private: |
| 84 void InitializeShadowFetchContext(); |
| 85 |
83 void PrepareShadowPageForLoader(); | 86 void PrepareShadowPageForLoader(); |
84 void LoadShadowPage(); | 87 void LoadShadowPage(); |
85 | 88 |
86 // WebFrameClient overrides. | 89 // WebFrameClient overrides. |
87 void DidFinishDocumentLoad() override; | 90 void DidFinishDocumentLoad() override; |
88 | 91 |
89 // WebDevToolsAgentClient overrides. | 92 // WebDevToolsAgentClient overrides. |
90 void SendProtocolMessage(int session_id, | 93 void SendProtocolMessage(int session_id, |
91 int call_id, | 94 int call_id, |
92 const WebString&, | 95 const WebString&, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 134 |
132 enum WaitingForDebuggerState { kWaitingForDebugger, kNotWaitingForDebugger }; | 135 enum WaitingForDebuggerState { kWaitingForDebugger, kNotWaitingForDebugger }; |
133 | 136 |
134 enum { | 137 enum { |
135 kDontPauseAfterDownload, | 138 kDontPauseAfterDownload, |
136 kDoPauseAfterDownload, | 139 kDoPauseAfterDownload, |
137 kIsPausedAfterDownload | 140 kIsPausedAfterDownload |
138 } pause_after_download_state_; | 141 } pause_after_download_state_; |
139 | 142 |
140 WaitingForDebuggerState waiting_for_debugger_state_; | 143 WaitingForDebuggerState waiting_for_debugger_state_; |
| 144 |
| 145 Persistent<WorkerShadowFetchContext> shadow_fetch_context_; |
141 }; | 146 }; |
142 | 147 |
143 } // namespace blink | 148 } // namespace blink |
144 | 149 |
145 #endif // WebEmbeddedWorkerImpl_h | 150 #endif // WebEmbeddedWorkerImpl_h |
OLD | NEW |