From ffbb16e854190b525854d215a1de24c36ad7828c Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Sat, 17 Jun 2017 03:41:58 +0300 Subject: [PATCH] Adds a basic offline check to InstallableManager. https://codereview.chromium.org/2751343002 --- atom/browser/api/atom_api_web_contents.cc | 2 +- atom/browser/api/atom_api_web_contents.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index e9a4012ff4e0..dd71a7b8b654 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1238,7 +1238,7 @@ void WebContents::InspectServiceWorker() { } void WebContents::HasServiceWorker( - const base::Callback& callback) { + const base::Callback& callback) { auto context = GetServiceWorkerContext(web_contents()); if (!context) return; diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index dbc388bbec9a..999ddef6e4f9 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -15,6 +15,7 @@ #include "atom/browser/ui/autofill_popup.h" #include "content/common/cursors/webcursor.h" #include "content/public/browser/keyboard_event_processing_result.h" +#include "content/public/browser/service_worker_context.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/favicon_url.h" #include "native_mate/handle.h" @@ -116,7 +117,8 @@ class WebContents : public mate::TrackableObject, void DisableDeviceEmulation(); void InspectElement(int x, int y); void InspectServiceWorker(); - void HasServiceWorker(const base::Callback&); + void HasServiceWorker( + const base::Callback&); void UnregisterServiceWorker(const base::Callback&); void SetIgnoreMenuShortcuts(bool ignore); void SetAudioMuted(bool muted);