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

Unified Diff: ui/views/window/dialog_delegate.h

Issue 2375843003: views: add Harmony dialog width support (Closed)
Patch Set: GetPreferredSize -> DialogClientView Created 4 years, 2 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: ui/views/window/dialog_delegate.h
diff --git a/ui/views/window/dialog_delegate.h b/ui/views/window/dialog_delegate.h
index c74f5461ab9f131376a6261deb563a448be75c49..05a1c18f45b7ec294778bc4058a2a5ccec9b9dd2 100644
--- a/ui/views/window/dialog_delegate.h
+++ b/ui/views/window/dialog_delegate.h
@@ -113,14 +113,30 @@ class VIEWS_EXPORT DialogDelegate : public ui::DialogModel,
const DialogClientView* GetDialogClientView() const;
DialogClientView* GetDialogClientView();
+ // Returns this dialog's width factor, if it has one. If it does not,
+ // returns zero.
+ int GetWidthFactor() const;
Evan Stade 2016/10/05 19:52:29 I would expect this to either return an int that i
+
protected:
// Overridden from WidgetDelegate:
ui::AXRole GetAccessibleWindowRole() const override;
+ // These values are in the 32px units the Harmony spec uses.
Evan Stade 2016/10/05 19:52:29 a/units/increments
+ enum class DialogWidth {
+ UNSPECIFIED = 0,
+ SMALL = 10,
+ MEDIUM = 14,
+ LARGE = 16,
+ };
+
+ void set_dialog_width(DialogWidth width) { dialog_width_ = width; }
+
private:
// A flag indicating whether this dialog is able to use the custom frame
// style for dialogs.
bool supports_custom_frame_;
+
+ DialogWidth dialog_width_ = DialogWidth::UNSPECIFIED;
};
// A DialogDelegate implementation that is-a View. Used to override GetWidget()

Powered by Google App Engine
This is Rietveld 408576698