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

Unified Diff: extensions/renderer/script_context.h

Issue 2943583002: [extension SW] Support lazy events from extension service workers. (Closed)
Patch Set: sync @tott Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/event_bindings.cc ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.h
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h
index 63a17d06e1385d51b16b86b367d75bbb6b60e706..17b82e50c31a6bc6aeef6b2c81c5c4ca3345d9f3 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -149,11 +149,16 @@ class ScriptContext : public RequestSender::Source {
// - It might let us remove the about:blank resolving?
const GURL& url() const { return url_; }
+ const GURL& service_worker_scope() const;
+
// Sets the URL of this ScriptContext. Usually this will automatically be set
// on construction, unless this isn't constructed with enough information to
// determine the URL (e.g. frame was null).
// TODO(kalman): Make this a constructor parameter (as an origin).
void set_url(const GURL& url) { url_ = url; }
+ void set_service_worker_scope(const GURL& scope) {
+ service_worker_scope_ = scope;
+ }
// Returns whether the API |api| or any part of the API could be available in
// this context without taking into account the context's extension.
@@ -269,6 +274,8 @@ class ScriptContext : public RequestSender::Source {
GURL url_;
+ GURL service_worker_scope_;
+
std::unique_ptr<Runner> runner_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « extensions/renderer/event_bindings.cc ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698