Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/EmulationModel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/EmulationModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/EmulationModel.js |
| index 51d51cb4d461702db64d093bd6e7fbd39bab237a..7d6ef9b4fd98bab1fcaabf8dbb6613d208efe1ea 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/EmulationModel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/EmulationModel.js |
| @@ -22,6 +22,11 @@ SDK.EmulationModel = class extends SDK.SDKModel { |
| if (disableJavascriptSetting.get()) |
| this._emulationAgent.setScriptExecutionDisabled(true); |
| + var mediaSetting = Common.moduleSetting('emulatedCSSMedia'); |
| + mediaSetting.addChangeListener(() => this.emulateCSSMedia(mediaSetting.get())); |
| + if (mediaSetting.get()) |
| + this.emulateCSSMedia(mediaSetting.get()); |
| + |
| this._touchEnabled = false; |
| this._touchMobile = false; |
| this._customTouchEnabled = false; |
| @@ -110,10 +115,10 @@ SDK.EmulationModel = class extends SDK.SDKModel { |
| } |
| /** |
| - * @param {?string} media |
| + * @param {string} media |
| */ |
| emulateCSSMedia(media) { |
|
dgozman
2017/05/16 18:47:25
Can now make this private.
luoe
2017/05/30 20:56:15
Done.
|
| - this._emulationAgent.setEmulatedMedia(media || ''); |
| + this._emulationAgent.setEmulatedMedia(media); |
| if (this._cssModel) |
| this._cssModel.mediaQueryResultChanged(); |
| } |