| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @constructor |
| 7 */ |
| 8 WebInspector.DevicesDialog = function() |
| 9 { |
| 10 } |
| 11 |
| 12 /** |
| 13 * @constructor |
| 14 * @implements {WebInspector.ActionDelegate} |
| 15 */ |
| 16 WebInspector.DevicesDialog.ActionDelegate = function() |
| 17 { |
| 18 /** @type {?WebInspector.DevicesView} */ |
| 19 this._view = null; |
| 20 } |
| 21 |
| 22 WebInspector.DevicesDialog.ActionDelegate.prototype = { |
| 23 /** |
| 24 * @override |
| 25 * @param {!WebInspector.Context} context |
| 26 * @param {string} actionId |
| 27 * @return {boolean} |
| 28 */ |
| 29 handleAction: function(context, actionId) |
| 30 { |
| 31 if (actionId === "devices.dialog.show") { |
| 32 if (!this._view) |
| 33 this._view = new WebInspector.DevicesView(); |
| 34 |
| 35 var dialog = new WebInspector.Dialog(); |
| 36 dialog.addCloseButton(); |
| 37 this._view.show(dialog.element); |
| 38 dialog.setMaxSize(new Size(700, 500)); |
| 39 dialog.show(); |
| 40 return true; |
| 41 } |
| 42 return false; |
| 43 } |
| 44 } |
| OLD | NEW |