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

Unified Diff: third_party/document_image_extractor/src/document_image.js

Issue 1138123002: Update third_party/document_image_extractor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/document_image_extractor/src/document_image.js
diff --git a/third_party/document_image_extractor/src/document_image.js b/third_party/document_image_extractor/src/document_image.js
index fe1dea829b6fb88f8cbb9408f0937ca8fa4bd5db..147d37f722c2243023f15336cfccebf02b01f44f 100644
--- a/third_party/document_image_extractor/src/document_image.js
+++ b/third_party/document_image_extractor/src/document_image.js
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-goog.provide('image.collections.extension.DocumentImage');
+goog.provide('image.collections.extension.domextractor.DocumentImage');
-goog.require('goog.asserts');
-goog.require('image.collections.extension.DocumentFeature');
+goog.require('image.collections.extension.domextractor.DocumentFeature');
+goog.require('image.collections.extension.domextractor.DomUtils');
goog.scope(function() {
-var DocumentFeature = image.collections.extension.DocumentFeature;
+var DocumentFeature = image.collections.extension.domextractor.DocumentFeature;
@@ -16,32 +16,38 @@ var DocumentFeature = image.collections.extension.DocumentFeature;
* A class representing a salient image in an HTML document.
* @param {number} relevance
* @param {string} url
- * @param {!goog.math.Size=} opt_size Natural size of image or null if image
- * size is not available in the DOM tree.
- * @param {!goog.math.Size=} opt_displaySize Size at which the image is being
- * shown. One of opt_size or opt_displaySize MUST be specified.
+ * @param {!image.collections.extension.domextractor.Size=} opt_size Natural
+ * size of image or undefined if image size is not available in the DOM
+ * tree.
+ * @param {!image.collections.extension.domextractor.Size=} opt_displaySize Size
+ * at which the image is being shown. One of opt_size or opt_displaySize
+ * MUST be specified.
* @extends {DocumentFeature}
* @constructor
+ * @suppress {undefinedNames}
*/
-image.collections.extension.DocumentImage = function(
+image.collections.extension.domextractor.DocumentImage = function(
relevance, url, opt_size, opt_displaySize) {
DocumentImage.base(this, 'constructor', relevance);
/** @private {string} Absolute image url. */
this.url_ = url;
- /** @private {!goog.math.Size|undefined} Image resolution in pixels. */
+ /**
+ * @private {!image.collections.extension.domextractor.Size|undefined} Image
+ * resolution in pixels.
+ */
this.size_ = opt_size;
- /** @private {!goog.math.Size|undefined} Displayed image resolution
- * in pixels.
+ /**
+ * @private {!image.collections.extension.domextractor.Size|undefined}
+ * Displayed image resolution in pixels.
*/
this.displaySize_ = opt_displaySize;
-
- goog.asserts.assert(goog.isDef(opt_size) || goog.isDef(opt_displaySize));
};
-goog.inherits(image.collections.extension.DocumentImage, DocumentFeature);
-var DocumentImage = image.collections.extension.DocumentImage;
+image.collections.extension.domextractor.DomUtils.inherits(
+ image.collections.extension.domextractor.DocumentImage, DocumentFeature);
+var DocumentImage = image.collections.extension.domextractor.DocumentImage;
/**
@@ -67,7 +73,7 @@ DocumentImage.prototype.getUrl = function() {
/**
* Returns the image resolution in pixels.
- * @return {!goog.math.Size|undefined}
+ * @return {!image.collections.extension.domextractor.Size|undefined}
*/
DocumentImage.prototype.getSize = function() {
return this.size_;
@@ -76,7 +82,7 @@ DocumentImage.prototype.getSize = function() {
/**
* Returns the shown image resolution in pixels.
- * @return {!goog.math.Size|undefined}
+ * @return {!image.collections.extension.domextractor.Size|undefined}
*/
DocumentImage.prototype.getDisplaySize = function() {
return this.displaySize_;

Powered by Google App Engine
This is Rietveld 408576698