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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js

Issue 2592483002: [DevTools] Move console viewport to console, rename StaticViewportControl. (Closed)
Patch Set: Created 4 years 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/console/ConsoleViewport.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
similarity index 96%
copy from third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js
copy to third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
index b3f40d42015177bbbe6e1656e481e50084bd295a..3388cd73f3779e16cabf143a725430296e9543e6 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
@@ -31,9 +31,9 @@
/**
* @unrestricted
*/
-UI.ViewportControl = class {
+Console.ConsoleViewport = class {
/**
- * @param {!UI.ViewportControl.Provider} provider
+ * @param {!Console.ConsoleViewportProvider} provider
*/
constructor(provider) {
this.element = createElement('div');
@@ -128,7 +128,7 @@ UI.ViewportControl = class {
/**
* @param {number} index
- * @return {?UI.ViewportElement}
+ * @return {?Console.ConsoleViewportElement}
*/
_providerElement(index) {
if (!this._cachedProviderElements)
@@ -356,7 +356,7 @@ UI.ViewportControl = class {
this._cumulativeHeights[this._cumulativeHeights.length - 1] - this._cumulativeHeights[this._lastActiveIndex];
/**
- * @this {UI.ViewportControl}
+ * @this {Console.ConsoleViewport}
*/
function prepare() {
this._topGapElement.style.height = topGapHeight + 'px';
@@ -577,9 +577,9 @@ UI.ViewportControl = class {
/**
* @interface
*/
-UI.ViewportControl.Provider = function() {};
+Console.ConsoleViewportProvider = function() {};
-UI.ViewportControl.Provider.prototype = {
+Console.ConsoleViewportProvider.prototype = {
/**
* @param {number} index
* @return {number}
@@ -604,7 +604,7 @@ UI.ViewportControl.Provider.prototype = {
/**
* @param {number} index
- * @return {?UI.ViewportElement}
+ * @return {?Console.ConsoleViewportElement}
*/
itemElement(index) {
return null;
@@ -614,8 +614,8 @@ UI.ViewportControl.Provider.prototype = {
/**
* @interface
*/
-UI.ViewportElement = function() {};
-UI.ViewportElement.prototype = {
+Console.ConsoleViewportElement = function() {};
+Console.ConsoleViewportElement.prototype = {
willHide() {},
wasShown() {},
@@ -625,36 +625,3 @@ UI.ViewportElement.prototype = {
*/
element() {},
};
-
-/**
- * @implements {UI.ViewportElement}
- * @unrestricted
- */
-UI.StaticViewportElement = class {
- /**
- * @param {!Element} element
- */
- constructor(element) {
- this._element = element;
- }
-
- /**
- * @override
- */
- willHide() {
- }
-
- /**
- * @override
- */
- wasShown() {
- }
-
- /**
- * @override
- * @return {!Element}
- */
- element() {
- return this._element;
- }
-};

Powered by Google App Engine
This is Rietveld 408576698