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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 2250473002: DevTools: Repick execution context when frames are loaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename fire event 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 if (WebInspector.moduleSetting("customFormatters").get()) 48 if (WebInspector.moduleSetting("customFormatters").get())
49 this._agent.setCustomObjectFormatterEnabled(true); 49 this._agent.setCustomObjectFormatterEnabled(true);
50 50
51 WebInspector.moduleSetting("customFormatters").addChangeListener(this._custo mFormattersStateChanged.bind(this)); 51 WebInspector.moduleSetting("customFormatters").addChangeListener(this._custo mFormattersStateChanged.bind(this));
52 } 52 }
53 53
54 WebInspector.RuntimeModel.Events = { 54 WebInspector.RuntimeModel.Events = {
55 ExecutionContextCreated: "ExecutionContextCreated", 55 ExecutionContextCreated: "ExecutionContextCreated",
56 ExecutionContextDestroyed: "ExecutionContextDestroyed", 56 ExecutionContextDestroyed: "ExecutionContextDestroyed",
57 ExecutionContextChanged: "ExecutionContextChanged" 57 ExecutionContextChanged: "ExecutionContextChanged",
58 ExecutionContextOrderChanged: "ExecutionContextOrderChanged"
58 } 59 }
59 60
60 WebInspector.RuntimeModel._privateScript = "private script"; 61 WebInspector.RuntimeModel._privateScript = "private script";
61 62
62 WebInspector.RuntimeModel.prototype = { 63 WebInspector.RuntimeModel.prototype = {
63 64
64 /** 65 /**
65 * @return {!Array.<!WebInspector.ExecutionContext>} 66 * @return {!Array.<!WebInspector.ExecutionContext>}
66 */ 67 */
67 executionContexts: function() 68 executionContexts: function()
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 */ 127 */
127 _executionContextDestroyed: function(executionContextId) 128 _executionContextDestroyed: function(executionContextId)
128 { 129 {
129 var executionContext = this._executionContextById.get(executionContextId ); 130 var executionContext = this._executionContextById.get(executionContextId );
130 if (!executionContext) 131 if (!executionContext)
131 return; 132 return;
132 this._executionContextById.delete(executionContextId); 133 this._executionContextById.delete(executionContextId);
133 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execution ContextDestroyed, executionContext); 134 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execution ContextDestroyed, executionContext);
134 }, 135 },
135 136
137 fireExecutionContextOrderChanged: function()
138 {
139 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execution ContextOrderChanged, this);
140 },
141
136 _executionContextsCleared: function() 142 _executionContextsCleared: function()
137 { 143 {
138 var debuggerModel = WebInspector.DebuggerModel.fromTarget(this.target()) ; 144 var debuggerModel = WebInspector.DebuggerModel.fromTarget(this.target()) ;
139 if (debuggerModel) 145 if (debuggerModel)
140 debuggerModel.globalObjectCleared(); 146 debuggerModel.globalObjectCleared();
141 var contexts = this.executionContexts(); 147 var contexts = this.executionContexts();
142 this._executionContextById.clear(); 148 this._executionContextById.clear();
143 for (var i = 0; i < contexts.length; ++i) 149 for (var i = 0; i < contexts.length; ++i)
144 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execu tionContextDestroyed, contexts[i]); 150 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execu tionContextDestroyed, contexts[i]);
145 }, 151 },
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 /** 1028 /**
1023 * @return {boolean} 1029 * @return {boolean}
1024 */ 1030 */
1025 isNormalListenerType: function() 1031 isNormalListenerType: function()
1026 { 1032 {
1027 return this._listenerType === "normal"; 1033 return this._listenerType === "normal";
1028 }, 1034 },
1029 1035
1030 __proto__: WebInspector.SDKObject.prototype 1036 __proto__: WebInspector.SDKObject.prototype
1031 } 1037 }
OLDNEW
« 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