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

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

Issue 2141273002: Reland of DevTools: automatically populate 'More tools' submenu with the drawer views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698