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

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

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_Activate
Patch Set: Update callers 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
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | extensions/browser/app_window/app_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 return SERVICE_WORKER_ERROR_ABORT; 1905 return SERVICE_WORKER_ERROR_ABORT;
1903 default: 1906 default:
1904 return SERVICE_WORKER_ERROR_NETWORK; 1907 return SERVICE_WORKER_ERROR_NETWORK;
1905 } 1908 }
1906 } 1909 }
1907 1910
1908 return default_code; 1911 return default_code;
1909 } 1912 }
1910 1913
1911 } // namespace content 1914 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | extensions/browser/app_window/app_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698