OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/service_worker/service_worker_version.h" | 5 #include "content/browser/service_worker/service_worker_version.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 RenderProcessHost* render_process_host = | 237 RenderProcessHost* render_process_host = |
238 RenderProcessHost::FromID(process_id); | 238 RenderProcessHost::FromID(process_id); |
239 if (render_process_host->IsIsolatedGuest()) { | 239 if (render_process_host->IsIsolatedGuest()) { |
240 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 240 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
241 base::Bind(callback, | 241 base::Bind(callback, |
242 ChildProcessHost::kInvalidUniqueID, | 242 ChildProcessHost::kInvalidUniqueID, |
243 MSG_ROUTING_NONE)); | 243 MSG_ROUTING_NONE)); |
244 return; | 244 return; |
245 } | 245 } |
246 | 246 |
247 OpenURLParams params(url, | 247 OpenURLParams params( |
248 Referrer(script_url, blink::WebReferrerPolicyDefault), | 248 url, Referrer::SanitizeForRequest( |
249 NEW_FOREGROUND_TAB, | 249 url, Referrer(script_url, blink::WebReferrerPolicyDefault)), |
250 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 250 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
251 true /* is_renderer_initiated */); | 251 true /* is_renderer_initiated */); |
252 | 252 |
253 WebContents* web_contents = | 253 WebContents* web_contents = |
254 GetContentClient()->browser()->OpenURL(browser_context, params); | 254 GetContentClient()->browser()->OpenURL(browser_context, params); |
255 DCHECK(web_contents); | 255 DCHECK(web_contents); |
256 | 256 |
257 new WindowOpenedObserver(web_contents, callback); | 257 new WindowOpenedObserver(web_contents, callback); |
258 } | 258 } |
259 | 259 |
260 void KillEmbeddedWorkerProcess(int process_id, ResultCode code) { | 260 void KillEmbeddedWorkerProcess(int process_id, ResultCode code) { |
261 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 261 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 int request_id) { | 1417 int request_id) { |
1418 callbacks->Remove(request_id); | 1418 callbacks->Remove(request_id); |
1419 if (is_doomed_) { | 1419 if (is_doomed_) { |
1420 // The stop should be already scheduled, but try to stop immediately, in | 1420 // The stop should be already scheduled, but try to stop immediately, in |
1421 // order to release worker resources soon. | 1421 // order to release worker resources soon. |
1422 StopWorkerIfIdle(); | 1422 StopWorkerIfIdle(); |
1423 } | 1423 } |
1424 } | 1424 } |
1425 | 1425 |
1426 } // namespace content | 1426 } // namespace content |
OLD | NEW |