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

Side by Side Diff: content/browser/service_worker/service_worker_version.cc

Issue 1135693006: Fix X11DesktopHandler::ActivateWindow on Unity for known user gestures Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
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/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 ChildProcessHost::kInvalidUniqueID, 248 ChildProcessHost::kInvalidUniqueID,
249 MSG_ROUTING_NONE)); 249 MSG_ROUTING_NONE));
250 return; 250 return;
251 } 251 }
252 252
253 OpenURLParams params( 253 OpenURLParams params(
254 url, Referrer::SanitizeForRequest( 254 url, Referrer::SanitizeForRequest(
255 url, Referrer(script_url, blink::WebReferrerPolicyDefault)), 255 url, Referrer(script_url, blink::WebReferrerPolicyDefault)),
256 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 256 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
257 true /* is_renderer_initiated */); 257 true /* is_renderer_initiated */);
258 // Service Workers only allow openWindow() to be called in reponse to a user
259 // gesture (e.g. notificationclick event).
260 params.user_gesture = true;
258 261
259 GetContentClient()->browser()->OpenURL( 262 GetContentClient()->browser()->OpenURL(
260 browser_context, params, 263 browser_context, params,
261 base::Bind(&DidOpenURL, callback)); 264 base::Bind(&DidOpenURL, callback));
262 } 265 }
263 266
264 void KillEmbeddedWorkerProcess(int process_id, ResultCode code) { 267 void KillEmbeddedWorkerProcess(int process_id, ResultCode code) {
265 DCHECK_CURRENTLY_ON(BrowserThread::UI); 268 DCHECK_CURRENTLY_ON(BrowserThread::UI);
266 RenderProcessHost* render_process_host = 269 RenderProcessHost* render_process_host =
267 RenderProcessHost::FromID(process_id); 270 RenderProcessHost::FromID(process_id);
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 return SERVICE_WORKER_ERROR_ABORT; 1881 return SERVICE_WORKER_ERROR_ABORT;
1879 default: 1882 default:
1880 return SERVICE_WORKER_ERROR_NETWORK; 1883 return SERVICE_WORKER_ERROR_NETWORK;
1881 } 1884 }
1882 } 1885 }
1883 1886
1884 return default_code; 1887 return default_code;
1885 } 1888 }
1886 1889
1887 } // namespace content 1890 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698