OLD | NEW |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 const WebString&) override; | 82 const WebString&) override; |
83 void ResumeStartup() override; | 83 void ResumeStartup() override; |
84 WebDevToolsAgentClient::WebKitClientMessageLoop* CreateClientMessageLoop() | 84 WebDevToolsAgentClient::WebKitClientMessageLoop* CreateClientMessageLoop() |
85 override; | 85 override; |
86 | 86 |
87 // WebSharedWorker methods: | 87 // WebSharedWorker methods: |
88 void StartWorkerContext(const WebURL&, | 88 void StartWorkerContext(const WebURL&, |
89 const WebString& name, | 89 const WebString& name, |
90 const WebString& content_security_policy, | 90 const WebString& content_security_policy, |
91 WebContentSecurityPolicyType, | 91 WebContentSecurityPolicyType, |
92 WebAddressSpace) override; | 92 WebAddressSpace, |
| 93 bool data_saver_enabled) override; |
93 void Connect(std::unique_ptr<WebMessagePortChannel>) override; | 94 void Connect(std::unique_ptr<WebMessagePortChannel>) override; |
94 void TerminateWorkerContext() override; | 95 void TerminateWorkerContext() override; |
95 | 96 |
96 void PauseWorkerContextOnStart() override; | 97 void PauseWorkerContextOnStart() override; |
97 void AttachDevTools(const WebString& host_id, int session_id) override; | 98 void AttachDevTools(const WebString& host_id, int session_id) override; |
98 void ReattachDevTools(const WebString& host_id, | 99 void ReattachDevTools(const WebString& host_id, |
99 int sesion_id, | 100 int sesion_id, |
100 const WebString& saved_state) override; | 101 const WebString& saved_state) override; |
101 void DetachDevTools(int session_id) override; | 102 void DetachDevTools(int session_id) override; |
102 void DispatchDevToolsMessage(int session_id, | 103 void DispatchDevToolsMessage(int session_id, |
103 int call_id, | 104 int call_id, |
104 const WebString& method, | 105 const WebString& method, |
105 const WebString& message) override; | 106 const WebString& message) override; |
106 | 107 |
107 // Callback methods for WebSharedWorkerReportingProxyImpl. | 108 // Callback methods for WebSharedWorkerReportingProxyImpl. |
108 void CountFeature(UseCounter::Feature); | 109 void CountFeature(UseCounter::Feature); |
109 void PostMessageToPageInspector(const String& message); | 110 void PostMessageToPageInspector(const String& message); |
110 void DidCloseWorkerGlobalScope(); | 111 void DidCloseWorkerGlobalScope(); |
111 void DidTerminateWorkerThread(); | 112 void DidTerminateWorkerThread(); |
112 | 113 |
113 private: | 114 private: |
114 ~WebSharedWorkerImpl() override; | 115 ~WebSharedWorkerImpl() override; |
115 | 116 |
116 WorkerThread* GetWorkerThread() { return worker_thread_.get(); } | 117 WorkerThread* GetWorkerThread() { return worker_thread_.get(); } |
117 | 118 |
118 // Shuts down the worker thread. | 119 // Shuts down the worker thread. |
119 void TerminateWorkerThread(); | 120 void TerminateWorkerThread(); |
120 | 121 |
121 // Creates the shadow loader used for worker network requests. | 122 // Creates the shadow loader used for worker network requests. |
122 void InitializeLoader(); | 123 void InitializeLoader(bool data_saver_enabled); |
123 | 124 |
124 void LoadShadowPage(); | 125 void LoadShadowPage(); |
125 void DidReceiveScriptLoaderResponse(); | 126 void DidReceiveScriptLoaderResponse(); |
126 void OnScriptLoaderFinished(); | 127 void OnScriptLoaderFinished(); |
127 | 128 |
128 void ConnectTaskOnWorkerThread(std::unique_ptr<WebMessagePortChannel>); | 129 void ConnectTaskOnWorkerThread(std::unique_ptr<WebMessagePortChannel>); |
129 | 130 |
130 // WorkerLoaderProxyProvider | 131 // WorkerLoaderProxyProvider |
131 ThreadableLoadingContext* GetThreadableLoadingContext() override; | 132 ThreadableLoadingContext* GetThreadableLoadingContext() override; |
132 | 133 |
(...skipping 23 matching lines...) Expand all Loading... |
156 RefPtr<WorkerLoaderProxy> loader_proxy_; | 157 RefPtr<WorkerLoaderProxy> loader_proxy_; |
157 | 158 |
158 WebURL url_; | 159 WebURL url_; |
159 WebString name_; | 160 WebString name_; |
160 WebAddressSpace creation_address_space_; | 161 WebAddressSpace creation_address_space_; |
161 }; | 162 }; |
162 | 163 |
163 } // namespace blink | 164 } // namespace blink |
164 | 165 |
165 #endif // WebSharedWorkerImpl_h | 166 #endif // WebSharedWorkerImpl_h |
OLD | NEW |