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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js

Issue 1569893003: Add "Request app banner" context menu in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated dfalcantara's comment Created 4 years, 11 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * @param {function()} updateCallback 7 * @param {function()} updateCallback
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.DeviceModeModel = function(updateCallback) 10 WebInspector.DeviceModeModel = function(updateCallback)
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 /** 354 /**
355 * @override 355 * @override
356 * @param {!WebInspector.Target} target 356 * @param {!WebInspector.Target} target
357 */ 357 */
358 targetRemoved: function(target) 358 targetRemoved: function(target)
359 { 359 {
360 if (this._target === target) 360 if (this._target === target)
361 this._target = null; 361 this._target = null;
362 }, 362 },
363 363
364 requestAppBanner: function()
365 {
366 this._target.pageAgent().requestAppBanner();
367 },
368
364 _scaleSettingChanged: function() 369 _scaleSettingChanged: function()
365 { 370 {
366 this._calculateAndEmulate(true); 371 this._calculateAndEmulate(true);
367 }, 372 },
368 373
369 _widthSettingChanged: function() 374 _widthSettingChanged: function()
370 { 375 {
371 this._calculateAndEmulate(false); 376 this._calculateAndEmulate(false);
372 }, 377 },
373 378
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 if (!this._target || orientation === this._screenOrientation) 602 if (!this._target || orientation === this._screenOrientation)
598 return; 603 return;
599 604
600 this._screenOrientation = orientation; 605 this._screenOrientation = orientation;
601 if (!this._screenOrientation) 606 if (!this._screenOrientation)
602 this._target.screenOrientationAgent().clearScreenOrientationOverride (); 607 this._target.screenOrientationAgent().clearScreenOrientationOverride ();
603 else 608 else
604 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation)); 609 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation));
605 } 610 }
606 } 611 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698