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

Unified Diff: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: fix compile and tests Created 3 years, 7 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: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
diff --git a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
index 24c926314434ae60b20bb165e916992f5e07f79e..4a026014cce8214269fa8bd0c903df382eb46ff0 100644
--- a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
+++ b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
@@ -28,8 +28,6 @@ const int kDefaultWidth = 600;
const int kDefaultHeight = 250;
const int kPaddingToMessage = 20;
-const int kInset = 40;
-const int kTopInset = 10;
////////////////////////////////////////////////////////////////////////////////
// Dialog for an aborted multi-profile session due to a user policy change .
@@ -113,11 +111,13 @@ gfx::Size MultiprofilesSessionAbortedView::GetPreferredSize() const {
void MultiprofilesSessionAbortedView::InitDialog(
const std::string& user_email) {
- const gfx::Insets kDialogInsets(kTopInset, kInset, kInset, kInset);
-
+ constexpr int kTopInset = 10;
+ constexpr int kOtherInset = 40;
// Create the views and layout manager and set them up.
- views::GridLayout* grid_layout = views::GridLayout::CreatePanel(this);
- grid_layout->SetInsets(kDialogInsets);
+ views::GridLayout* grid_layout = new views::GridLayout(this);
+ SetLayoutManager(grid_layout);
+ SetBorder(views::CreateEmptyBorder(kTopInset, kOtherInset, kOtherInset,
+ kOtherInset));
views::ColumnSet* column_set = grid_layout->AddColumnSet(0);
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,

Powered by Google App Engine
This is Rietveld 408576698