| Index: content/browser/service_worker/service_worker_provider_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
|
| index 6a79c56d753730f444f8e027745818d1db8ea1ea..59bc89f5db8dea2596e609c6c06b1c6497f191c8 100644
|
| --- a/content/browser/service_worker/service_worker_provider_host.cc
|
| +++ b/content/browser/service_worker/service_worker_provider_host.cc
|
| @@ -50,8 +50,9 @@ ServiceWorkerClientInfo FocusOnUIThread(
|
| // Focus the frame's view to make sure the frame is now considered as focused.
|
| render_frame_host->GetView()->Focus();
|
|
|
| - // Move the web contents to the foreground.
|
| - web_contents->Activate();
|
| + // Move the web contents to the foreground. Service Workers only allow focus()
|
| + // to be called in reponse to a user gesture (e.g. notificationclick event).
|
| + web_contents->Activate(true /* user_gesture */);
|
|
|
| return ServiceWorkerProviderHost::GetWindowClientInfoOnUI(render_process_id,
|
| render_frame_id);
|
|
|