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

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: nits 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..e9892098e26815f0b2f430e760147c628722c6fb 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,17 @@ 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,
+ bool is_success,
+ std::string data);
+
// Contains extension resource built from path of file which is
// specified in JSON arguments.
extensions::ExtensionResource resource_;
@@ -76,6 +85,8 @@ class WebViewInternalExecuteCodeFunction
GURL guest_src_;
+ ScopedVector<WebUIURLFetcher> fetchers_;
+
DISALLOW_COPY_AND_ASSIGN(WebViewInternalExecuteCodeFunction);
};

Powered by Google App Engine
This is Rietveld 408576698