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

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

Issue 2705553002: Cleanups for DialogClientView, DialogClientViewTest. (Closed)
Patch Set: Remove unncessary child check 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
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.h
diff --git a/ui/views/window/dialog_client_view.h b/ui/views/window/dialog_client_view.h
index bfd116b5320383a43eb1c89ffa9ef2ec3b96d018..3602812832829fe28371f772bb36f6e6bf6b8800 100644
--- a/ui/views/window/dialog_client_view.h
+++ b/ui/views/window/dialog_client_view.h
@@ -66,23 +66,16 @@ class VIEWS_EXPORT DialogClientView : public ClientView,
void set_minimum_size(const gfx::Size& size) { minimum_size_ = size; }
- protected:
- // For testing.
- explicit DialogClientView(View* contents_view);
-
- // Returns the DialogDelegate for the window. Virtual for testing.
- virtual DialogDelegate* GetDialogDelegate() const;
+ private:
+ bool has_dialog_buttons() const { return ok_button_ || cancel_button_; }
- // Create and add the extra view, if supplied by the delegate.
- void CreateExtraView();
+ // Returns the DialogDelegate for the window.
+ DialogDelegate* GetDialogDelegate() const;
// View implementation.
void ChildPreferredSizeChanged(View* child) override;
void ChildVisibilityChanged(View* child) override;
- private:
- bool has_dialog_buttons() const { return ok_button_ || cancel_button_; }
-
// Create a dialog button of the appropriate type.
LabelButton* CreateDialogButton(ui::DialogButton type);
@@ -106,6 +99,13 @@ class VIEWS_EXPORT DialogClientView : public ClientView,
// delegate may choose to add/remove views at any time.
void SetupFocusChain();
+ // Returns the spacing between the extra view and the ok/cancel buttons. 0 if
+ // no extra view. Otherwise uses GetExtraViewPadding() or the default padding.
+ int GetExtraViewSpacing() const;
+
+ // Creates or deletes any buttons that are required. Updates data members.
+ void SetupViews();
+
// How much to inset the button row.
gfx::Insets button_row_insets_;
« no previous file with comments | « no previous file | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698