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

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 pfeldman'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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 /** 366 /**
367 * @override 367 * @override
368 * @param {!WebInspector.Target} target 368 * @param {!WebInspector.Target} target
369 */ 369 */
370 targetRemoved: function(target) 370 targetRemoved: function(target)
371 { 371 {
372 if (this._target === target) 372 if (this._target === target)
373 this._target = null; 373 this._target = null;
374 }, 374 },
375 375
376 requestAppBanner: function()
377 {
378 this._target.pageAgent().requestAppBanner();
379 },
380
376 _scaleSettingChanged: function() 381 _scaleSettingChanged: function()
377 { 382 {
378 this._calculateAndEmulate(true); 383 this._calculateAndEmulate(true);
379 }, 384 },
380 385
381 _widthSettingChanged: function() 386 _widthSettingChanged: function()
382 { 387 {
383 this._calculateAndEmulate(false); 388 this._calculateAndEmulate(false);
384 }, 389 },
385 390
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 if (!this._target || orientation === this._screenOrientation) 614 if (!this._target || orientation === this._screenOrientation)
610 return; 615 return;
611 616
612 this._screenOrientation = orientation; 617 this._screenOrientation = orientation;
613 if (!this._screenOrientation) 618 if (!this._screenOrientation)
614 this._target.screenOrientationAgent().clearScreenOrientationOverride (); 619 this._target.screenOrientationAgent().clearScreenOrientationOverride ();
615 else 620 else
616 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation)); 621 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation));
617 } 622 }
618 } 623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698