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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js

Issue 2610963005: [DevTools] Pass the frame payload (Closed)
Patch Set: [DevTools] Pass the frame payload Created 3 years, 11 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 | « third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js
index 2b0b903fa3fe02e5b361a455438be235710cca3b..d70e70da218d7c68f8edfdf80f8676a9bae405c2 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SecurityOriginManager.js
@@ -28,15 +28,17 @@ SDK.SecurityOriginManager = class extends SDK.SDKModel {
/**
* @param {string} securityOrigin
+ * @param {boolean} isMain
*/
- addSecurityOrigin(securityOrigin) {
- var currentCount = this._securityOriginCounter.get(securityOrigin);
- if (!currentCount) {
- this._securityOriginCounter.set(securityOrigin, 1);
+ addSecurityOrigin(securityOrigin, isMain) {
+ var currentCount = this._securityOriginCounter.get(securityOrigin) || 0;
+ this._securityOriginCounter.set(securityOrigin, currentCount + 1);
+ if (!currentCount)
this.dispatchEventToListeners(SDK.SecurityOriginManager.Events.SecurityOriginAdded, securityOrigin);
+ if (!isMain)
return;
- }
- this._securityOriginCounter.set(securityOrigin, currentCount + 1);
+ this._mainSecurityOrigin = securityOrigin;
+ this.dispatchEventToListeners(SDK.SecurityOriginManager.Events.MainSecurityOriginChanged, securityOrigin);
}
/**
@@ -65,14 +67,6 @@ SDK.SecurityOriginManager = class extends SDK.SDKModel {
mainSecurityOrigin() {
return this._mainSecurityOrigin;
}
-
- /**
- * @param {string} securityOrigin
- */
- setMainSecurityOrigin(securityOrigin) {
- this._mainSecurityOrigin = securityOrigin;
- this.dispatchEventToListeners(SDK.SecurityOriginManager.Events.MainSecurityOriginChanged, securityOrigin);
- }
};
/** @enum {symbol} */
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698