OLD | NEW |
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 */ |
11 WebInspector.ResponsiveDesignView = function(inspectedPagePlaceholder) | 11 WebInspector.ResponsiveDesignView = function(inspectedPagePlaceholder) |
12 { | 12 { |
13 WebInspector.VBox.call(this); | 13 WebInspector.VBox.call(this); |
| 14 this.setMinimumSize(150, 150); |
14 this.registerRequiredCSS("responsiveDesignView.css"); | 15 this.registerRequiredCSS("responsiveDesignView.css"); |
15 | 16 |
16 this._responsiveDesignContainer = new WebInspector.VBox(); | 17 this._responsiveDesignContainer = new WebInspector.VBox(); |
17 | 18 |
18 this._createToolbar(); | 19 this._createToolbar(); |
19 this._warningMessage = this._responsiveDesignContainer.element.createChild("
div", "responsive-design-warning hidden"); | 20 this._warningMessage = this._responsiveDesignContainer.element.createChild("
div", "responsive-design-warning hidden"); |
20 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport
.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); | 21 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport
.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); |
21 | 22 |
22 this._canvasContainer = new WebInspector.View(); | 23 this._canvasContainer = new WebInspector.View(); |
23 this._canvasContainer.element.classList.add("responsive-design"); | 24 this._canvasContainer.element.classList.add("responsive-design"); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 if (this._warningMessage.textContent === message) | 459 if (this._warningMessage.textContent === message) |
459 return; | 460 return; |
460 this._warningMessage.classList.toggle("hidden", !message); | 461 this._warningMessage.classList.toggle("hidden", !message); |
461 this._warningMessage.textContent = message; | 462 this._warningMessage.textContent = message; |
462 this._invalidateCache(); | 463 this._invalidateCache(); |
463 this.onResize(); | 464 this.onResize(); |
464 }, | 465 }, |
465 | 466 |
466 __proto__: WebInspector.VBox.prototype | 467 __proto__: WebInspector.VBox.prototype |
467 }; | 468 }; |
OLD | NEW |