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

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

Issue 2142303002: Revert 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/devices/DevicesDialog.js
diff --git a/third_party/WebKit/Source/devtools/front_end/devices/DevicesDialog.js b/third_party/WebKit/Source/devtools/front_end/devices/DevicesDialog.js
new file mode 100644
index 0000000000000000000000000000000000000000..05fdade17b097fcb0982f55e138ae4cdc013047a
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/devices/DevicesDialog.js
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @constructor
+ */
+WebInspector.DevicesDialog = function()
+{
+}
+
+/**
+ * @constructor
+ * @implements {WebInspector.ActionDelegate}
+ */
+WebInspector.DevicesDialog.ActionDelegate = function()
+{
+ /** @type {?WebInspector.DevicesView} */
+ this._view = null;
+}
+
+WebInspector.DevicesDialog.ActionDelegate.prototype = {
+ /**
+ * @override
+ * @param {!WebInspector.Context} context
+ * @param {string} actionId
+ * @return {boolean}
+ */
+ handleAction: function(context, actionId)
+ {
+ if (actionId === "devices.dialog.show") {
+ if (!this._view)
+ this._view = new WebInspector.DevicesView();
+
+ var dialog = new WebInspector.Dialog();
+ dialog.addCloseButton();
+ this._view.show(dialog.element);
+ dialog.setMaxSize(new Size(700, 500));
+ dialog.show();
+ return true;
+ }
+ return false;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698