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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2702523003: [DevTools] Continue GlassPane refactoring. (Closed)
Patch Set: element Created 3 years, 10 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/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index f999a81d9b1304205843b15027257e674418e82d..64d4636c6f65dd750fe878a10babc2c6c3daa191 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -95,9 +95,9 @@ UI.DragHandler = class {
_createGlassPane() {
this._glassPaneInUse = true;
if (!UI.DragHandler._glassPaneUsageCount++) {
- UI.DragHandler._glassPane = new UI.GlassPane(
- UI.DragHandler._documentForMouseOut, false /* dimmed */, true /* blockPointerEvents */, event => {});
- UI.DragHandler._glassPane.show();
+ UI.DragHandler._glassPane = new UI.GlassPane();
+ UI.DragHandler._glassPane.setBlockPointerEvents(true);
+ UI.DragHandler._glassPane.showGlassPane(UI.DragHandler._documentForMouseOut);
}
}
@@ -107,7 +107,7 @@ UI.DragHandler = class {
this._glassPaneInUse = false;
if (--UI.DragHandler._glassPaneUsageCount)
return;
- UI.DragHandler._glassPane.hide();
+ UI.DragHandler._glassPane.hideGlassPane();
delete UI.DragHandler._glassPane;
delete UI.DragHandler._documentForMouseOut;
}
@@ -2037,24 +2037,25 @@ UI.MaxLengthForDisplayedURLs = 150;
*/
UI.ConfirmDialog = class extends UI.VBox {
/**
+ * @param {!Document|!Element} where
* @param {string} message
* @param {!Function} callback
*/
- static show(message, callback) {
+ static show(where, message, callback) {
var dialog = new UI.Dialog();
- dialog.setWrapsContent(true);
+ dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
dialog.addCloseButton();
dialog.setDimmed(true);
new UI
.ConfirmDialog(
message,
() => {
- dialog.detach();
+ dialog.hideDialog();
callback();
},
- () => dialog.detach())
- .show(dialog.element);
- dialog.show();
+ () => dialog.hideDialog())
+ .show(dialog.contentElement);
+ dialog.showDialog(where);
}
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js ('k') | third_party/WebKit/Source/devtools/front_end/ui/dialog.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698