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

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: Android support 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 /** 304 /**
305 * @override 305 * @override
306 * @param {!WebInspector.Target} target 306 * @param {!WebInspector.Target} target
307 */ 307 */
308 targetRemoved: function(target) 308 targetRemoved: function(target)
309 { 309 {
310 if (this._target === target) 310 if (this._target === target)
311 this._target = null; 311 this._target = null;
312 }, 312 },
313 313
314 openAppBanner: function()
315 {
316 this._target.pageAgent().openAppBanner();
317 },
318
314 _scaleSettingChanged: function() 319 _scaleSettingChanged: function()
315 { 320 {
316 this._calculateAndEmulate(true); 321 this._calculateAndEmulate(true);
317 }, 322 },
318 323
319 _widthSettingChanged: function() 324 _widthSettingChanged: function()
320 { 325 {
321 this._calculateAndEmulate(false); 326 this._calculateAndEmulate(false);
322 }, 327 },
323 328
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 if (!this._target || orientation === this._screenOrientation) 523 if (!this._target || orientation === this._screenOrientation)
519 return; 524 return;
520 525
521 this._screenOrientation = orientation; 526 this._screenOrientation = orientation;
522 if (!this._screenOrientation) 527 if (!this._screenOrientation)
523 this._target.screenOrientationAgent().clearScreenOrientationOverride (); 528 this._target.screenOrientationAgent().clearScreenOrientationOverride ();
524 else 529 else
525 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation)); 530 this._target.screenOrientationAgent().setScreenOrientationOverride(t his._screenOrientation === "landscapePrimary" ? 90 : 0, /** @type {!ScreenOrient ationAgent.OrientationType} */ (this._screenOrientation));
526 } 531 }
527 } 532 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698