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

Unified Diff: extensions/renderer/script_context.h

Issue 2208483002: Fix extension bindings injection for iframes (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments, fixed lint Created 4 years, 4 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
Index: extensions/renderer/script_context.h
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h
index bbfd2f6b90edb872edabb62abdf811c8597a2d5b..dd97ac90dc3871d8b7c8d095aec42e33eec09c66 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -5,6 +5,7 @@
#ifndef EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_
#define EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_
+#include <memory>
#include <string>
#include <utility>
#include <vector>
@@ -157,6 +158,13 @@ class ScriptContext : public RequestSender::Source {
// The returned URL may be invalid.
static GURL GetDataSourceURLForFrame(const blink::WebFrame* frame);
+ // Similar to GetDataSourceURLForFrame, but only returns the data source URL
+ // if the frame's document url is empty and the frame has a security origin
+ // that allows access to the data source url.
+ // TODO(asargent/devlin) - there may be places that should switch to using
+ // this instead of GetDataSourceURLForFrame.
+ static GURL GetAccessCheckedFrameURL(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.

Powered by Google App Engine
This is Rietveld 408576698