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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
index d49669a3492fa759bcf264955df3e65e99d5f422..5932d66818fb40b55666b5a7d691464dd77e778c 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
@@ -376,6 +376,31 @@ SDK.ResourceTreeModel = class extends SDK.SDKModel {
}
/**
+ * @param {string} url
+ */
+ navigate(url) {
+ this._agent.navigate(url, undefined, (error, frameId) => undefined);
+ }
+
+ /**
+ * @return {!Promise<?{currentIndex: number, entries: !Protocol.Page.NavigationEntry}>}
+ */
+ navigationHistory() {
+ return this._agent.getNavigationHistory((error, currentIndex, entries) => {
+ if (error)
+ return null;
+ return {currentIndex: currentIndex, entries: entries};
+ });
+ }
+
+ /**
+ * @param {!Protocol.Page.NavigationEntry} entry
+ */
+ navigateToHistoryEntry(entry) {
+ this._agent.navigateToHistoryEntry(entry.id);
+ }
+
+ /**
* @param {function(string, ?string,!Array<!Protocol.Page.AppManifestError>)} callback
*/
fetchAppManifest(callback) {

Powered by Google App Engine
This is Rietveld 408576698