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

Side by Side Diff: chrome/browser/resources/net_internals/view.js

Issue 5228004: Switch the about:gpu implementation from an about handler to dom_ui.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/net_internals/tabswitcherview.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Base class to represent a "view". A view is an absolutely positioned box on 6 * Base class to represent a "view". A view is an absolutely positioned box on
7 * the page. 7 * the page.
8 * 8 *
9 * @constructor 9 * @constructor
10 */ 10 */
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 /** 74 /**
75 * DivView is an implementation of View that wraps a DIV. 75 * DivView is an implementation of View that wraps a DIV.
76 * 76 *
77 * @constructor 77 * @constructor
78 */ 78 */
79 function DivView(divId) { 79 function DivView(divId) {
80 View.call(this); 80 View.call(this);
81 81
82 this.node_ = document.getElementById(divId); 82 this.node_ = document.getElementById(divId);
83 if (!this.node_)
84 throw new Error('Element ' + divId + ' not found');
83 85
84 // Initialize the default values to those of the DIV. 86 // Initialize the default values to those of the DIV.
85 this.width_ = this.node_.offsetWidth; 87 this.width_ = this.node_.offsetWidth;
86 this.height_ = this.node_.offsetHeight; 88 this.height_ = this.node_.offsetHeight;
87 this.isVisible_ = this.node_.style.display != 'none'; 89 this.isVisible_ = this.node_.style.display != 'none';
88 } 90 }
89 91
90 inherits(DivView, View); 92 inherits(DivView, View);
91 93
92 DivView.prototype.setGeometry = function(left, top, width, height) { 94 DivView.prototype.setGeometry = function(left, top, width, height) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 134
133 WindowView.prototype.show = function() { 135 WindowView.prototype.show = function() {
134 WindowView.superClass_.show.call(this, isVisible); 136 WindowView.superClass_.show.call(this, isVisible);
135 this.childView_.show(isVisible); 137 this.childView_.show(isVisible);
136 }; 138 };
137 139
138 WindowView.prototype.resetGeometry = function() { 140 WindowView.prototype.resetGeometry = function() {
139 this.setGeometry(0, 0, window.innerWidth, window.innerHeight); 141 this.setGeometry(0, 0, window.innerWidth, window.innerHeight);
140 }; 142 };
141 143
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/tabswitcherview.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698