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

Side by Side Diff: Source/devtools/front_end/ResponsiveDesignView.js

Issue 362773003: [DevTools] Explicitly enable/disable Page.viewportChanged protocol event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.OverridesSupport.PageResizer} 8 * @implements {WebInspector.OverridesSupport.PageResizer}
9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
10 */ 10 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 delete this._cachedCssWidth; 83 delete this._cachedCssWidth;
84 delete this._cachedZoomFactor; 84 delete this._cachedZoomFactor;
85 delete this._cachedViewport; 85 delete this._cachedViewport;
86 delete this._cachedDrawContentsSize; 86 delete this._cachedDrawContentsSize;
87 delete this._availableSize; 87 delete this._availableSize;
88 }, 88 },
89 89
90 _emulationEnabledChanged: function() 90 _emulationEnabledChanged: function()
91 { 91 {
92 var enabled = WebInspector.overridesSupport.emulationEnabled(); 92 var enabled = WebInspector.overridesSupport.emulationEnabled();
93 WebInspector.resourceTreeModel.setViewportChangedEventEnabled(enabled);
pfeldman 2014/07/01 15:36:29 Could we reuse existing event for that instead?
dgozman 2014/07/01 16:26:15 Done.
93 this._mediaInspector.setEnabled(enabled); 94 this._mediaInspector.setEnabled(enabled);
94 if (enabled && !this._enabled) { 95 if (enabled && !this._enabled) {
95 this._invalidateCache(); 96 this._invalidateCache();
96 this._ignoreResize = true; 97 this._ignoreResize = true;
97 this._enabled = true; 98 this._enabled = true;
98 this._inspectedPagePlaceholder.clearMinimumSizeAndMargins(); 99 this._inspectedPagePlaceholder.clearMinimumSizeAndMargins();
99 this._inspectedPagePlaceholder.show(this._pageContainer); 100 this._inspectedPagePlaceholder.show(this._pageContainer);
100 this._responsiveDesignContainer.show(this.element); 101 this._responsiveDesignContainer.show(this.element);
101 delete this._ignoreResize; 102 delete this._ignoreResize;
102 this.onResize(); 103 this.onResize();
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 * @param {!WebInspector.Throttler.FinishCallback} finishCallback 604 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
604 */ 605 */
605 _updateUIThrottled: function(finishCallback) 606 _updateUIThrottled: function(finishCallback)
606 { 607 {
607 this._updateUI(); 608 this._updateUI();
608 finishCallback(); 609 finishCallback();
609 }, 610 },
610 611
611 __proto__: WebInspector.VBox.prototype 612 __proto__: WebInspector.VBox.prototype
612 }; 613 };
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/devtools/front_end/sdk/ResourceTreeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698