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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionServer.js

Issue 2801943003: [DevTools] Remove SDK.SDKObject (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 console.warn('evaluate: the main frame is not yet available'); 925 console.warn('evaluate: the main frame is not yet available');
926 return this._status.E_NOTFOUND(options.frameURL || '<top>'); 926 return this._status.E_NOTFOUND(options.frameURL || '<top>');
927 } 927 }
928 928
929 var contextSecurityOrigin; 929 var contextSecurityOrigin;
930 if (options.useContentScriptContext) 930 if (options.useContentScriptContext)
931 contextSecurityOrigin = securityOrigin; 931 contextSecurityOrigin = securityOrigin;
932 else if (options.scriptExecutionContext) 932 else if (options.scriptExecutionContext)
933 contextSecurityOrigin = options.scriptExecutionContext; 933 contextSecurityOrigin = options.scriptExecutionContext;
934 934
935 var runtimeModel = frame.target().model(SDK.RuntimeModel); 935 var runtimeModel = frame.resourceTreeModel().target().model(SDK.RuntimeModel );
936 var executionContexts = runtimeModel ? runtimeModel.executionContexts() : [] ; 936 var executionContexts = runtimeModel ? runtimeModel.executionContexts() : [] ;
937 if (contextSecurityOrigin) { 937 if (contextSecurityOrigin) {
938 for (var i = 0; i < executionContexts.length; ++i) { 938 for (var i = 0; i < executionContexts.length; ++i) {
939 var executionContext = executionContexts[i]; 939 var executionContext = executionContexts[i];
940 if (executionContext.frameId === frame.id && executionContext.origin === contextSecurityOrigin && 940 if (executionContext.frameId === frame.id && executionContext.origin === contextSecurityOrigin &&
941 !executionContext.isDefault) 941 !executionContext.isDefault)
942 context = executionContext; 942 context = executionContext;
943 } 943 }
944 if (!context) { 944 if (!context) {
945 console.warn('The JavaScript context ' + contextSecurityOrigin + ' was n ot found in the frame ' + frame.url); 945 console.warn('The JavaScript context ' + contextSecurityOrigin + ' was n ot found in the frame ' + frame.url);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 /** 1045 /**
1046 * @typedef {{code: string, description: string, details: !Array.<*>}} 1046 * @typedef {{code: string, description: string, details: !Array.<*>}}
1047 */ 1047 */
1048 Extensions.ExtensionStatus.Record; 1048 Extensions.ExtensionStatus.Record;
1049 1049
1050 Extensions.extensionAPI = {}; 1050 Extensions.extensionAPI = {};
1051 defineCommonExtensionSymbols(Extensions.extensionAPI); 1051 defineCommonExtensionSymbols(Extensions.extensionAPI);
1052 1052
1053 /** @type {!Extensions.ExtensionServer} */ 1053 /** @type {!Extensions.ExtensionServer} */
1054 Extensions.extensionServer; 1054 Extensions.extensionServer;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698