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

Unified Diff: remoting/webapp/crd/js/client_plugin_host_desktop_impl.js

Issue 1015553003: Added more typechecking functions and unit tests for existing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « remoting/webapp/crd/js/cast_extension_handler.js ('k') | remoting/webapp/crd/js/client_plugin_impl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_plugin_host_desktop_impl.js
diff --git a/remoting/webapp/crd/js/client_plugin_host_desktop_impl.js b/remoting/webapp/crd/js/client_plugin_host_desktop_impl.js
index 78ca6df168a33d4830d099d78835f5c59588bac9..71cb164a0c1f265acd6f97ddb71ae61852693b18 100644
--- a/remoting/webapp/crd/js/client_plugin_host_desktop_impl.js
+++ b/remoting/webapp/crd/js/client_plugin_host_desktop_impl.js
@@ -86,10 +86,10 @@ remoting.ClientPlugin.HostDesktopImpl.prototype.resize = function(
*/
remoting.ClientPlugin.HostDesktopImpl.prototype.onSizeUpdated = function(
message) {
- this.width_ = getNumberAttr(message.data, 'width');
- this.height_ = getNumberAttr(message.data, 'height');
- this.xDpi_ = getNumberAttr(message.data, 'x_dpi', 96);
- this.yDpi_ = getNumberAttr(message.data, 'y_dpi', 96);
+ this.width_ = base.getNumberAttr(message.data, 'width');
+ this.height_ = base.getNumberAttr(message.data, 'height');
+ this.xDpi_ = base.getNumberAttr(message.data, 'x_dpi', 96);
+ this.yDpi_ = base.getNumberAttr(message.data, 'y_dpi', 96);
this.raiseEvent(remoting.HostDesktop.Events.sizeChanged,
this.getDimensions());
};
@@ -104,7 +104,7 @@ remoting.ClientPlugin.HostDesktopImpl.prototype.onSizeUpdated = function(
*/
remoting.ClientPlugin.HostDesktopImpl.prototype.onShapeUpdated =
function(message) {
- var shapes = getArrayAttr(message.data, 'rects');
+ var shapes = base.getArrayAttr(message.data, 'rects');
var rects = shapes.map(
/** @param {Array.<number>} shape */
function(shape) {
« no previous file with comments | « remoting/webapp/crd/js/cast_extension_handler.js ('k') | remoting/webapp/crd/js/client_plugin_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698