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

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

Issue 2625083003: Implement Harmony-style consistent button widths for Collected Cookies. (Closed)
Patch Set: Start on DialogClientview 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 | « ui/views/layout/grid_layout.cc ('k') | 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..ac73c06fae982d683f1b21e11df1c6adf317becb 100644
--- a/ui/views/window/dialog_client_view.h
+++ b/ui/views/window/dialog_client_view.h
@@ -12,6 +12,9 @@
#include "ui/views/window/client_view.h"
namespace views {
+namespace test {
+class TestDialogClientView;
+}
class DialogDelegate;
class LabelButton;
@@ -66,23 +69,18 @@ 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);
+ private:
+ friend class test::TestDialogClientView;
+
+ bool has_dialog_buttons() const { return ok_button_ || cancel_button_; }
// Returns the DialogDelegate for the window. Virtual for testing.
virtual DialogDelegate* GetDialogDelegate() const;
- // Create and add the extra view, if supplied by the delegate.
- void CreateExtraView();
-
// 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);
@@ -102,6 +100,14 @@ class VIEWS_EXPORT DialogClientView : public ClientView,
// padding between them and the contents view.
gfx::Insets GetButtonRowInsets() const;
+ // Installs and configures the LayoutManager. Does not add any views.
+ void SetupLayout();
+
+ // First removes all child views, creates or deletes any buttons that are
+ // required. Then adds the contents view, buttons and ExtraView (if any) to
+ // the LayoutManager.
+ void SetupViews();
+
// Sets up the focus chain for the child views. This is required since the
// delegate may choose to add/remove views at any time.
void SetupFocusChain();
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | ui/views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698