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

Side by Side Diff: content/public/browser/service_worker_context.h

Issue 252893006: Remove the unused source_process_id and provider_host arguments to SW unregistration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/service_worker/service_worker_job_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 19 matching lines...) Expand all
30 // * |script_url| is on a different origin from |pattern| 30 // * |script_url| is on a different origin from |pattern|
31 // * Fetching |script_url| fails. 31 // * Fetching |script_url| fails.
32 // * |script_url| fails to parse or its top-level execution fails. 32 // * |script_url| fails to parse or its top-level execution fails.
33 // TODO: The error message for this needs to be available to developers. 33 // TODO: The error message for this needs to be available to developers.
34 // * Something unexpected goes wrong, like a renderer crash or a full disk. 34 // * Something unexpected goes wrong, like a renderer crash or a full disk.
35 virtual void RegisterServiceWorker(const Scope& pattern, 35 virtual void RegisterServiceWorker(const Scope& pattern,
36 const GURL& script_url, 36 const GURL& script_url,
37 const ResultCallback& callback) = 0; 37 const ResultCallback& callback) = 0;
38 38
39 // Equivalent to calling navigator.serviceWorker.unregister(pattern) from a 39 // Equivalent to calling navigator.serviceWorker.unregister(pattern) from a
40 // renderer in |source_process_id|, except that |pattern| is an absolute URL 40 // renderer, except that |pattern| is an absolute URL instead of relative to
41 // instead of relative to some current origin. |callback| is passed true 41 // some current origin. |callback| is passed true when the JS promise is
42 // when the JS promise is fulfilled or false when the JS promise is rejected. 42 // fulfilled or false when the JS promise is rejected.
43 // 43 //
44 // Unregistration can fail if: 44 // Unregistration can fail if:
45 // * No Service Worker was registered for |pattern|. 45 // * No Service Worker was registered for |pattern|.
46 // * Something unexpected goes wrong, like a renderer crash. 46 // * Something unexpected goes wrong, like a renderer crash.
47 virtual void UnregisterServiceWorker(const Scope& pattern, 47 virtual void UnregisterServiceWorker(const Scope& pattern,
48 int source_process_id,
49 const ResultCallback& callback) = 0; 48 const ResultCallback& callback) = 0;
50 49
51 // TODO(jyasskin): Provide a way to SendMessage to a Scope. 50 // TODO(jyasskin): Provide a way to SendMessage to a Scope.
52 51
53 protected: 52 protected:
54 ServiceWorkerContext() {} 53 ServiceWorkerContext() {}
55 virtual ~ServiceWorkerContext() {} 54 virtual ~ServiceWorkerContext() {}
56 }; 55 };
57 56
58 } // namespace content 57 } // namespace content
59 58
60 #endif // CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 59 #endif // CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_job_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698