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

Unified Diff: chrome/browser/extensions/extension_renderer_state.h

Issue 333313004: Fix the bug that webview guest cannot load script of a SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made. Created 6 years, 6 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 | « no previous file | chrome/browser/extensions/extension_renderer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_renderer_state.h
diff --git a/chrome/browser/extensions/extension_renderer_state.h b/chrome/browser/extensions/extension_renderer_state.h
index 59349afb9024277ab29f5c3153e27944abbb9fca..49670f0838208ff54493740f3e28f5e9c3abe1da 100644
--- a/chrome/browser/extensions/extension_renderer_state.h
+++ b/chrome/browser/extensions/extension_renderer_state.h
@@ -42,6 +42,10 @@ class ExtensionRendererState {
bool GetWebViewInfo(int guest_process_id, int guest_routing_id,
WebViewInfo* webview_info);
+ // Looks up the partition info for the embedder <webview> for a given guest
+ // process. Called on the IO thread.
+ bool GetWebViewPartitionID(int guest_process_id, std::string* partition_id);
+
// Looks up the tab and window ID for a given request. Returns true if we have
// the IDs in our map. Called on the IO thread.
bool GetTabAndWindowId(
@@ -62,6 +66,17 @@ class ExtensionRendererState {
typedef std::map<RenderId, TabAndWindowId> TabAndWindowIdMap;
typedef std::map<RenderId, WebViewInfo> WebViewInfoMap;
+ struct WebViewPartitionInfo {
+ int web_view_count;
+ std::string partition_id;
+ WebViewPartitionInfo() {}
+ WebViewPartitionInfo(int count, std::string partition):
+ web_view_count(count),
+ partition_id(partition) {}
+ };
+
+ typedef std::map<int, WebViewPartitionInfo> WebViewPartitionIDMap;
+
ExtensionRendererState();
~ExtensionRendererState();
@@ -79,6 +94,7 @@ class ExtensionRendererState {
TabObserver* observer_;
TabAndWindowIdMap map_;
WebViewInfoMap webview_info_map_;
+ WebViewPartitionIDMap webview_partition_id_map_;
DISALLOW_COPY_AND_ASSIGN(ExtensionRendererState);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698