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

Side by Side Diff: Source/devtools/front_end/emulation/OverridesUI.js

Issue 1300703004: DevTools: only set title w/ shortcut via Tooltip manager API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 years, 4 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 | Annotate | Revision Log
OLDNEW
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 WebInspector.OverridesUI = {} 5 WebInspector.OverridesUI = {}
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @param {!Element} rotateButton 9 * @param {!Element} rotateButton
10 * @param {?function(!WebInspector.EmulatedDevice, !WebInspector.EmulatedDevice. Mode)} callback 10 * @param {?function(!WebInspector.EmulatedDevice, !WebInspector.EmulatedDevice. Mode)} callback
11 */ 11 */
12 WebInspector.DeviceSelect = function(rotateButton, callback) 12 WebInspector.DeviceSelect = function(rotateButton, callback)
13 { 13 {
14 this._callback = callback; 14 this._callback = callback;
15 this._rotateButton = rotateButton; 15 this._rotateButton = rotateButton;
16 this.element = createElement("p"); 16 this.element = createElement("p");
17 17
18 this._deviceSelectElement = this.element.createChild("select", "device-selec t"); 18 this._deviceSelectElement = this.element.createChild("select", "device-selec t");
19 this._deviceSelectElement.addEventListener("change", this._deviceSelected.bi nd(this), false); 19 this._deviceSelectElement.addEventListener("change", this._deviceSelected.bi nd(this), false);
20 20
21 var container = this.element.createChild("div", "mode-container"); 21 var container = this.element.createChild("div", "mode-container");
22 container.appendChild(this._rotateButton); 22 container.appendChild(this._rotateButton);
23 this._rotateButton.addEventListener("click", this._rotateButtonClicked.bind( this), false); 23 this._rotateButton.addEventListener("click", this._rotateButtonClicked.bind( this), false);
24 WebInspector.Tooltip.install(this._rotateButton, WebInspector.UIString("Chan ge orientation")); 24 this._rotateButton.title = WebInspector.UIString("Change orientation");
25 25
26 var modeSelectContainer = container.createChild("span", "mode-select"); 26 var modeSelectContainer = container.createChild("span", "mode-select");
27 this._modeSelectElement = modeSelectContainer.createChild("select"); 27 this._modeSelectElement = modeSelectContainer.createChild("select");
28 this._modeSelectElement.addEventListener("change", this._modeSelected.bind(t his), false); 28 this._modeSelectElement.addEventListener("change", this._modeSelected.bind(t his), false);
29 this._modeLabelElement = modeSelectContainer.createChild("label"); 29 this._modeLabelElement = modeSelectContainer.createChild("label");
30 this._modeLabelElement.addEventListener("click", this._rotateButtonClicked.b ind(this), false); 30 this._modeLabelElement.addEventListener("click", this._rotateButtonClicked.b ind(this), false);
31 WebInspector.Tooltip.install(this._modeLabelElement, WebInspector.UIString(" Change orientation")); 31 this._modeLabelElement.title = WebInspector.UIString("Change orientation");
32 32
33 this._emulatedSettingChangedMuted = false; 33 this._emulatedSettingChangedMuted = false;
34 this._lastOrientation = null; 34 this._lastOrientation = null;
35 35
36 WebInspector.overridesSupport.settings.emulateResolution.addChangeListener(t his._emulatedSettingChanged, this); 36 WebInspector.overridesSupport.settings.emulateResolution.addChangeListener(t his._emulatedSettingChanged, this);
37 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(this._e mulatedSettingChanged, this); 37 WebInspector.overridesSupport.settings.deviceWidth.addChangeListener(this._e mulatedSettingChanged, this);
38 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(this._ emulatedSettingChanged, this); 38 WebInspector.overridesSupport.settings.deviceHeight.addChangeListener(this._ emulatedSettingChanged, this);
39 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListener(t his._emulatedSettingChanged, this); 39 WebInspector.overridesSupport.settings.deviceScaleFactor.addChangeListener(t his._emulatedSettingChanged, this);
40 WebInspector.overridesSupport.settings.emulateMobile.addChangeListener(this. _emulatedSettingChanged, this); 40 WebInspector.overridesSupport.settings.emulateMobile.addChangeListener(this. _emulatedSettingChanged, this);
41 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(this._ emulatedSettingChanged, this); 41 WebInspector.overridesSupport.settings.emulateTouch.addChangeListener(this._ emulatedSettingChanged, this);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 {title: "iPhone \u2014 iOS 7", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_ 0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/1 1A4449d Safari/9537.53"}, 366 {title: "iPhone \u2014 iOS 7", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_ 0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/1 1A4449d Safari/9537.53"},
367 {title: "iPhone \u2014 iOS 6", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 6_ 0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A53 76e Safari/8536.25"}, 367 {title: "iPhone \u2014 iOS 6", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 6_ 0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A53 76e Safari/8536.25"},
368 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9) AppleW ebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13"}, 368 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9) AppleW ebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13"},
369 {title: "Opera 18 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537. 36 OPR/18.0.1284.68"}, 369 {title: "Opera 18 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537. 36 OPR/18.0.1284.68"},
370 {title: "Opera 18 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 6.1) Appl eWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.12 84.68"}, 370 {title: "Opera 18 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 6.1) Appl eWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 OPR/18.0.12 84.68"},
371 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, 371 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"},
372 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"}, 372 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"},
373 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5.0 (Linux ; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"}, 373 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5.0 (Linux ; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"},
374 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Ge cko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"} 374 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Ge cko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"}
375 ]; 375 ];
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/DevicesSettingsTab.js ('k') | Source/devtools/front_end/emulation/OverridesView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698