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

Side by Side Diff: Source/devtools/front_end/devices/DevicesDialog.js

Issue 1356363002: [DevTools] Remove relativeToElement from Dialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 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 * @extends {WebInspector.DialogDelegate} 7 * @extends {WebInspector.DialogDelegate}
8 */ 8 */
9 WebInspector.DevicesDialog = function() 9 WebInspector.DevicesDialog = function()
10 { 10 {
11 WebInspector.DialogDelegate.call(this); 11 WebInspector.DialogDelegate.call(this);
12 this.element.classList.add("devices-dialog"); 12 this.element.classList.add("devices-dialog");
13 this._view = new WebInspector.DevicesView(); 13 this._view = new WebInspector.DevicesView();
14 this._view.markAsRoot(); 14 this._view.markAsRoot();
15 15
16 this._closeButton = createElementWithClass("div", "dialog-close-button", "dt -close-button"); 16 this._closeButton = createElementWithClass("div", "dialog-close-button", "dt -close-button");
17 this._closeButton.gray = true; 17 this._closeButton.gray = true;
18 this._closeButton.addEventListener("click", WebInspector.Dialog.hide.bind(We bInspector.Dialog), false); 18 this._closeButton.addEventListener("click", WebInspector.Dialog.hide.bind(We bInspector.Dialog), false);
19 this.element.appendChild(this._closeButton); 19 this.element.appendChild(this._closeButton);
20 } 20 }
21 21
22 /** @type {?WebInspector.DevicesDialog} */ 22 /** @type {?WebInspector.DevicesDialog} */
23 WebInspector.DevicesDialog._instance = null; 23 WebInspector.DevicesDialog._instance = null;
24 24
25 WebInspector.DevicesDialog.show = function() 25 WebInspector.DevicesDialog.show = function()
26 { 26 {
27 if (!WebInspector.DevicesDialog._instance) 27 if (!WebInspector.DevicesDialog._instance)
28 WebInspector.DevicesDialog._instance = new WebInspector.DevicesDialog(); 28 WebInspector.DevicesDialog._instance = new WebInspector.DevicesDialog();
29 WebInspector.Dialog.show(null, WebInspector.DevicesDialog._instance); 29 WebInspector.Dialog.show(WebInspector.DevicesDialog._instance);
30 } 30 }
31 31
32 WebInspector.DevicesDialog.prototype = { 32 WebInspector.DevicesDialog.prototype = {
33 /** 33 /**
34 * @param {!Element} element 34 * @param {!Element} element
35 * @override 35 * @override
36 */ 36 */
37 show: function(element) 37 show: function(element)
38 { 38 {
39 WebInspector.DialogDelegate.prototype.show.call(this, element); 39 WebInspector.DialogDelegate.prototype.show.call(this, element);
(...skipping 25 matching lines...) Expand all
65 * @override 65 * @override
66 * @param {!WebInspector.Context} context 66 * @param {!WebInspector.Context} context
67 * @param {string} actionId 67 * @param {string} actionId
68 */ 68 */
69 handleAction: function(context, actionId) 69 handleAction: function(context, actionId)
70 { 70 {
71 if (actionId === "devices.dialog.show") 71 if (actionId === "devices.dialog.show")
72 WebInspector.DevicesDialog.show(); 72 WebInspector.DevicesDialog.show();
73 } 73 }
74 } 74 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components_lazy/FilmStripView.js ('k') | Source/devtools/front_end/settings/EditFileSystemDialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698