| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.
h" | 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.
h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // Layout the components. | 196 // Layout the components. |
| 197 const int panel_margin = LayoutDelegate::Get()->GetMetric( | 197 const int panel_margin = LayoutDelegate::Get()->GetMetric( |
| 198 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN); | 198 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN); |
| 199 views::GridLayout* dialog_layout = new views::GridLayout(this); | 199 views::GridLayout* dialog_layout = new views::GridLayout(this); |
| 200 dialog_layout->SetInsets(panel_margin, 0, 0, 0); | 200 dialog_layout->SetInsets(panel_margin, 0, 0, 0); |
| 201 SetLayoutManager(dialog_layout); | 201 SetLayoutManager(dialog_layout); |
| 202 | 202 |
| 203 // Use GridLayout inside the prompt bar because StyledLabel requires it. | 203 // Use GridLayout inside the prompt bar because StyledLabel requires it. |
| 204 views::GridLayout* prompt_layout = views::GridLayout::CreatePanel(prompt_bar); | 204 views::GridLayout* prompt_layout = views::GridLayout::CreatePanel(prompt_bar); |
| 205 prompt_bar->SetLayoutManager(prompt_layout); | |
| 206 prompt_layout->AddColumnSet(0)->AddColumn( | 205 prompt_layout->AddColumnSet(0)->AddColumn( |
| 207 views::GridLayout::FILL, views::GridLayout::CENTER, 100, | 206 views::GridLayout::FILL, views::GridLayout::CENTER, 100, |
| 208 views::GridLayout::USE_PREF, 0, 0); | 207 views::GridLayout::USE_PREF, 0, 0); |
| 209 prompt_layout->StartRow(0, 0); | 208 prompt_layout->StartRow(0, 0); |
| 210 prompt_layout->AddView(prompt_label); | 209 prompt_layout->AddView(prompt_label); |
| 211 // Use a column set with no padding. | 210 // Use a column set with no padding. |
| 212 dialog_layout->AddColumnSet(0)->AddColumn( | 211 dialog_layout->AddColumnSet(0)->AddColumn( |
| 213 views::GridLayout::FILL, views::GridLayout::FILL, 100, | 212 views::GridLayout::FILL, views::GridLayout::FILL, 100, |
| 214 views::GridLayout::USE_PREF, 0, 0); | 213 views::GridLayout::USE_PREF, 0, 0); |
| 215 dialog_layout->StartRow(0, 0); | 214 dialog_layout->StartRow(0, 0); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 void ProfileSigninConfirmationDialogViews::ButtonPressed( | 251 void ProfileSigninConfirmationDialogViews::ButtonPressed( |
| 253 views::Button* sender, | 252 views::Button* sender, |
| 254 const ui::Event& event) { | 253 const ui::Event& event) { |
| 255 DCHECK(prompt_for_new_profile_); | 254 DCHECK(prompt_for_new_profile_); |
| 256 if (delegate_) { | 255 if (delegate_) { |
| 257 delegate_->OnContinueSignin(); | 256 delegate_->OnContinueSignin(); |
| 258 delegate_ = nullptr; | 257 delegate_ = nullptr; |
| 259 } | 258 } |
| 260 GetWidget()->Close(); | 259 GetWidget()->Close(); |
| 261 } | 260 } |
| OLD | NEW |