2018-03-26 10:04:27 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2016-03-13 21:23:11 -04:00
|
|
|
(function(window) {
|
|
|
|
'use strict';
|
|
|
|
|
2016-06-27 09:36:36 -07:00
|
|
|
// Prevent redefinition.
|
|
|
|
if (window.GrDiffLine) { return; }
|
|
|
|
|
2016-03-13 21:23:11 -04:00
|
|
|
function GrDiffLine(type) {
|
|
|
|
this.type = type;
|
2016-03-25 09:02:30 -04:00
|
|
|
this.highlights = [];
|
2016-03-13 21:23:11 -04:00
|
|
|
}
|
|
|
|
|
2016-05-23 15:31:21 -07:00
|
|
|
GrDiffLine.prototype.afterNumber = 0;
|
|
|
|
|
2016-03-13 21:23:11 -04:00
|
|
|
GrDiffLine.prototype.beforeNumber = 0;
|
|
|
|
|
2016-05-23 15:31:21 -07:00
|
|
|
GrDiffLine.prototype.contextGroup = null;
|
2016-03-13 21:23:11 -04:00
|
|
|
|
|
|
|
GrDiffLine.prototype.text = '';
|
|
|
|
|
|
|
|
GrDiffLine.Type = {
|
|
|
|
ADD: 'add',
|
|
|
|
BOTH: 'both',
|
|
|
|
BLANK: 'blank',
|
2016-03-15 18:58:46 -04:00
|
|
|
CONTEXT_CONTROL: 'contextControl',
|
2016-03-13 21:23:11 -04:00
|
|
|
REMOVE: 'remove',
|
|
|
|
};
|
|
|
|
|
2016-03-24 17:59:35 -04:00
|
|
|
GrDiffLine.FILE = 'FILE';
|
|
|
|
|
2016-03-13 21:23:11 -04:00
|
|
|
GrDiffLine.BLANK_LINE = new GrDiffLine(GrDiffLine.Type.BLANK);
|
|
|
|
|
|
|
|
window.GrDiffLine = GrDiffLine;
|
|
|
|
})(window);
|