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

Side by Side Diff: Source/devtools/front_end/InspectorFrontendHostStub.js

Issue 298913004: [DevTools] Add Toolbox page to undocked DevTools frontend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 }, 252 },
253 253
254 /** 254 /**
255 * @param {string} eventType 255 * @param {string} eventType
256 */ 256 */
257 unsubscribe: function(eventType) 257 unsubscribe: function(eventType)
258 { 258 {
259 } 259 }
260 } 260 }
261 261
262 // Inherit bindings from the embedder.
263 if (top !== window) {
264 window.InspectorFrontendHost = top.InspectorFrontendHost;
265 }
266
267 if (!window.InspectorFrontendHost) { 262 if (!window.InspectorFrontendHost) {
268 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); 263 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub();
269 } else { 264 } else {
270 var proto = WebInspector.InspectorFrontendHostStub.prototype; 265 var proto = WebInspector.InspectorFrontendHostStub.prototype;
271 for (var name in proto) { 266 for (var name in proto) {
272 var value = proto[name]; 267 var value = proto[name];
273 if (typeof value !== "function" || InspectorFrontendHost[name]) 268 if (typeof value !== "function" || InspectorFrontendHost[name])
274 continue; 269 continue;
275 InspectorFrontendHost[name] = function(name) { 270 InspectorFrontendHost[name] = function(name) {
276 var message = "Incompatible embedder: method InspectorFrontendHost." + name + " is missing. Using stub instead."; 271 var message = "Incompatible embedder: method InspectorFrontendHost." + name + " is missing. Using stub instead.";
277 WebInspector.messageSink.addErrorMessage(message, true); 272 WebInspector.messageSink.addErrorMessage(message, true);
278 var args = Array.prototype.slice.call(arguments, 1); 273 var args = Array.prototype.slice.call(arguments, 1);
279 return proto[name].apply(InspectorFrontendHost, args); 274 return proto[name].apply(InspectorFrontendHost, args);
280 }.bind(null, name); 275 }.bind(null, name);
281 } 276 }
282 } 277 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698