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

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

Issue 1310273006: Devtools: convert pair of booleans in setInspectModeEnabled into enum parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 3 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 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 { 671 {
672 const gutterSize = 30; 672 const gutterSize = 30;
673 const bordersSize = WebInspector.ScreencastView._bordersSize; 673 const bordersSize = WebInspector.ScreencastView._bordersSize;
674 var width = this.element.offsetWidth - bordersSize - gutterSize; 674 var width = this.element.offsetWidth - bordersSize - gutterSize;
675 var height = this.element.offsetHeight - bordersSize - gutterSize - WebI nspector.ScreencastView._navBarHeight; 675 var height = this.element.offsetHeight - bordersSize - gutterSize - WebI nspector.ScreencastView._navBarHeight;
676 return { width: width, height: height }; 676 return { width: width, height: height };
677 }, 677 },
678 678
679 /** 679 /**
680 * @override 680 * @override
681 * @param {boolean} enabled 681 * @param {!DOMAgent.InspectMode} mode
682 * @param {boolean} inspectUAShadowDOM
683 * @param {!DOMAgent.HighlightConfig} config 682 * @param {!DOMAgent.HighlightConfig} config
684 * @param {function(?Protocol.Error)=} callback 683 * @param {function(?Protocol.Error)=} callback
685 */ 684 */
686 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac k) 685 setInspectMode: function(mode, config, callback)
687 { 686 {
688 this._inspectModeConfig = enabled ? config : null; 687 this._inspectModeConfig = mode !== DOMAgent.InspectMode.None ? config : null;
689 if (callback) 688 if (callback)
690 callback(null); 689 callback(null);
691 }, 690 },
692 691
693 /** 692 /**
694 * @override 693 * @override
695 * @param {!PageAgent.FrameId} frameId 694 * @param {!PageAgent.FrameId} frameId
696 */ 695 */
697 highlightFrame: function(frameId) 696 highlightFrame: function(frameId)
698 { 697 {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 return; 877 return;
879 this._maxDisplayedProgress = progress; 878 this._maxDisplayedProgress = progress;
880 this._displayProgress(progress); 879 this._displayProgress(progress);
881 }, 880 },
882 881
883 _displayProgress: function(progress) 882 _displayProgress: function(progress)
884 { 883 {
885 this._element.style.width = (100 * progress) + "%"; 884 this._element.style.width = (100 * progress) + "%";
886 } 885 }
887 }; 886 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/ElementsPanel.js ('k') | Source/devtools/front_end/sdk/DOMModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698