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

Unified Diff: extensions/renderer/script_context.h

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/user_script.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 5cc137e9e924b826f6e845cfbc15eb63dd07719d..d5f1ae104487c1bf0ce6ed1e582f93f633aa12a0 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -105,6 +105,13 @@ class ScriptContext : public RequestSender::Source {
// committed, this is the commited URL. Otherwise it is the provisional URL.
static GURL GetDataSourceURLForFrame(const blink::WebFrame* frame);
+ // Returns the first non-about:-URL in the document hierarchy above and
+ // including |frame|. The document hierarchy is only traversed if
+ // |document_url| is an about:-URL and if |match_about_blank| is true.
+ static GURL GetEffectiveDocumentURL(const blink::WebFrame* frame,
+ const GURL& document_url,
+ bool match_about_blank);
+
// RequestSender::Source implementation.
virtual ScriptContext* GetContext() OVERRIDE;
virtual void OnResponseReceived(const std::string& name,
« no previous file with comments | « extensions/common/user_script.cc ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698