Add getDiff() method to gr-rest-api-interface
+ Replace use of gr-ajax for retrieving the diff in gr-diff.
+ Add opt_params to fetchJSON so that query parameters can be
passed.
Change-Id: Iaa77c4082d6e83099e23f49205d859a5c938dd31
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
index 21ee076..a1a5c02 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
@@ -20,6 +20,7 @@
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-overlay/gr-overlay.html">
<link rel="import" href="../../shared/gr-request/gr-request.html">
+<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../gr-diff-preferences/gr-diff-preferences.html">
<link rel="import" href="../gr-diff-side/gr-diff-side.html">
@@ -57,11 +58,6 @@
border-right: 1px solid #ddd;
}
</style>
- <gr-ajax id="diffXHR"
- url="[[_computeDiffPath(changeNum, patchRange.patchNum, path)]]"
- params="[[_computeDiffQueryParams(patchRange.basePatchNum)]]"
- last-response="{{_diffResponse}}"
- loading="{{_loading}}"></gr-ajax>
<gr-ajax id="baseCommentsXHR"
url="[[_computeCommentsPath(changeNum, patchRange.basePatchNum)]]"></gr-ajax>
<gr-ajax id="commentsXHR"
@@ -118,6 +114,7 @@
on-remove-thread="_handleRemoveThread"></gr-diff-side>
</div>
</div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template>
<script src="gr-diff.js"></script>
</dom-module>