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

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

Issue 2815003002: [DevTools] Split InputModel out of screencast (Closed)
Patch Set: comments addressed 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (this._reloadSuspensionCount) { 369 if (this._reloadSuspensionCount) {
370 this._pendingReloadOptions = [bypassCache, scriptToEvaluateOnLoad]; 370 this._pendingReloadOptions = [bypassCache, scriptToEvaluateOnLoad];
371 return; 371 return;
372 } 372 }
373 this._pendingReloadOptions = null; 373 this._pendingReloadOptions = null;
374 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.WillReloadPage); 374 this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.WillReloadPage);
375 this._agent.reload(bypassCache, scriptToEvaluateOnLoad); 375 this._agent.reload(bypassCache, scriptToEvaluateOnLoad);
376 } 376 }
377 377
378 /** 378 /**
379 * @param {string} url
380 */
381 navigate(url) {
382 this._agent.navigate(url, undefined, (error, frameId) => undefined);
383 }
384
385 /**
386 * @return {!Promise<?{currentIndex: number, entries: !Protocol.Page.Navigatio nEntry}>}
387 */
388 navigationHistory() {
389 return this._agent.getNavigationHistory((error, currentIndex, entries) => {
390 if (error)
391 return null;
392 return {currentIndex: currentIndex, entries: entries};
393 });
394 }
395
396 /**
397 * @param {!Protocol.Page.NavigationEntry} entry
398 */
399 navigateToHistoryEntry(entry) {
400 this._agent.navigateToHistoryEntry(entry.id);
401 }
402
403 /**
379 * @param {function(string, ?string,!Array<!Protocol.Page.AppManifestError>)} callback 404 * @param {function(string, ?string,!Array<!Protocol.Page.AppManifestError>)} callback
380 */ 405 */
381 fetchAppManifest(callback) { 406 fetchAppManifest(callback) {
382 this._agent.getAppManifest(myCallback); 407 this._agent.getAppManifest(myCallback);
383 /** 408 /**
384 * @param {?Protocol.Error} protocolError 409 * @param {?Protocol.Error} protocolError
385 * @param {string} url 410 * @param {string} url
386 * @param {!Array<!Protocol.Page.AppManifestError>} errors 411 * @param {!Array<!Protocol.Page.AppManifestError>} errors
387 * @param {string=} data 412 * @param {string=} data
388 */ 413 */
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden); 892 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event s.InterstitialHidden);
868 } 893 }
869 894
870 /** 895 /**
871 * @override 896 * @override
872 */ 897 */
873 navigationRequested() { 898 navigationRequested() {
874 // Frontend is not interested in when navigations are requested. 899 // Frontend is not interested in when navigations are requested.
875 } 900 }
876 }; 901 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698