Index: extensions/renderer/script_context.h |
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h |
index c1408949fc68efb0bd03e24d4cba01ed38361427..b456fa207cfa2dff6e831671ce8f16531c9cd7eb 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_; |