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

Unified Diff: extensions/browser/api/guest_view/web_view/web_view_internal_api.h

Issue 1004253002: Enable <webview>.executeScript outside of Apps and Extensions [2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test. Created 5 years, 9 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/browser/api/guest_view/web_view/web_view_internal_api.h
diff --git a/extensions/browser/api/guest_view/web_view/web_view_internal_api.h b/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
index 37483df9e0a1c09c9b74057999f9cb005b590faa..b106c8a058df917611a70fa7c9ddfd127ef76da2 100644
--- a/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
+++ b/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
@@ -66,8 +66,15 @@ class WebViewInternalExecuteCodeFunction
extensions::ScriptExecutor* GetScriptExecutor() final;
bool IsWebView() const override;
const GURL& GetWebViewSrc() const override;
+ bool LoadFileForWebUI(const std::string& file_src,
+ const WebUILoadFileCallback& callback) override;
private:
+ class WebUIURLFetcher;
+
+ // Callbacks from WebUIURLFetcher.
+ void OnWebUIURLFetchComplete(const WebUIURLFetcher* fetcher);
+
// Contains extension resource built from path of file which is
// specified in JSON arguments.
extensions::ExtensionResource resource_;
@@ -76,6 +83,8 @@ class WebViewInternalExecuteCodeFunction
GURL guest_src_;
+ ScopedVector<WebUIURLFetcher> fetchers_;
+
DISALLOW_COPY_AND_ASSIGN(WebViewInternalExecuteCodeFunction);
};

Powered by Google App Engine
This is Rietveld 408576698