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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/screencast/ScreencastView.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 this._shortcuts = /** !Object.<number, function(Event=):boolean> */ ({}) ; 99 this._shortcuts = /** !Object.<number, function(Event=):boolean> */ ({}) ;
100 this._shortcuts[WebInspector.KeyboardShortcut.makeKey("l", WebInspector. KeyboardShortcut.Modifiers.Ctrl)] = this._focusNavigationBar.bind(this); 100 this._shortcuts[WebInspector.KeyboardShortcut.makeKey("l", WebInspector. KeyboardShortcut.Modifiers.Ctrl)] = this._focusNavigationBar.bind(this);
101 101
102 this._resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel. Events.ScreencastFrame, this._screencastFrame, this); 102 this._resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel. Events.ScreencastFrame, this._screencastFrame, this);
103 this._resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel. Events.ScreencastVisibilityChanged, this._screencastVisibilityChanged, this); 103 this._resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel. Events.ScreencastVisibilityChanged, this._screencastVisibilityChanged, this);
104 104
105 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.E vents.SuspendStateChanged, this._onSuspendStateChange, this); 105 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.E vents.SuspendStateChanged, this._onSuspendStateChange, this);
106 this._updateGlasspane(); 106 this._updateGlasspane();
107 }, 107 },
108 108
109 /**
110 * @override
111 */
109 wasShown: function() 112 wasShown: function()
110 { 113 {
111 this._startCasting(); 114 this._startCasting();
112 }, 115 },
113 116
117 /**
118 * @override
119 */
114 willHide: function() 120 willHide: function()
115 { 121 {
116 this._stopCasting(); 122 this._stopCasting();
117 }, 123 },
118 124
119 _startCasting: function() 125 _startCasting: function()
120 { 126 {
121 if (WebInspector.targetManager.allTargetsSuspended()) 127 if (WebInspector.targetManager.allTargetsSuspended())
122 return; 128 return;
123 if (this._isCasting) 129 if (this._isCasting)
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 modifiers = 1; 391 modifiers = 1;
386 if (event.ctrlKey) 392 if (event.ctrlKey)
387 modifiers += 2; 393 modifiers += 2;
388 if (event.metaKey) 394 if (event.metaKey)
389 modifiers += 4; 395 modifiers += 4;
390 if (event.shiftKey) 396 if (event.shiftKey)
391 modifiers += 8; 397 modifiers += 8;
392 return modifiers; 398 return modifiers;
393 }, 399 },
394 400
401 /**
402 * @override
403 */
395 onResize: function() 404 onResize: function()
396 { 405 {
397 if (this._deferredCasting) { 406 if (this._deferredCasting) {
398 clearTimeout(this._deferredCasting); 407 clearTimeout(this._deferredCasting);
399 delete this._deferredCasting; 408 delete this._deferredCasting;
400 } 409 }
401 410
402 this._stopCasting(); 411 this._stopCasting();
403 this._deferredCasting = setTimeout(this._startCasting.bind(this), 100); 412 this._deferredCasting = setTimeout(this._startCasting.bind(this), 100);
404 }, 413 },
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 return; 872 return;
864 this._maxDisplayedProgress = progress; 873 this._maxDisplayedProgress = progress;
865 this._displayProgress(progress); 874 this._displayProgress(progress);
866 }, 875 },
867 876
868 _displayProgress: function(progress) 877 _displayProgress: function(progress)
869 { 878 {
870 this._element.style.width = (100 * progress) + "%"; 879 this._element.style.width = (100 * progress) + "%";
871 } 880 }
872 }; 881 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698