| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void ProfileSigninConfirmationDialogViews::OnClosed() { | 151 void ProfileSigninConfirmationDialogViews::OnClosed() { |
| 152 Cancel(); | 152 Cancel(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 ui::ModalType ProfileSigninConfirmationDialogViews::GetModalType() const { | 155 ui::ModalType ProfileSigninConfirmationDialogViews::GetModalType() const { |
| 156 return ui::MODAL_TYPE_CHILD; | 156 return ui::MODAL_TYPE_CHILD; |
| 157 } | 157 } |
| 158 | 158 |
| 159 void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged( | 159 void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged( |
| 160 const ViewHierarchyChangedDetails& details) { | 160 const ViewHierarchyChangedDetails& details) { |
| 161 views::DialogDelegateView::ViewHierarchyChanged(details); |
| 161 if (!details.is_add || details.child != this) | 162 if (!details.is_add || details.child != this) |
| 162 return; | 163 return; |
| 163 | 164 |
| 164 const SkColor kPromptBarBackgroundColor = | 165 const SkColor kPromptBarBackgroundColor = |
| 165 ui::GetSigninConfirmationPromptBarColor( | 166 ui::GetSigninConfirmationPromptBarColor( |
| 166 ui::kSigninConfirmationPromptBarBackgroundAlpha); | 167 ui::kSigninConfirmationPromptBarBackgroundAlpha); |
| 167 | 168 |
| 168 // Create the prompt label. | 169 // Create the prompt label. |
| 169 size_t offset; | 170 size_t offset; |
| 170 const base::string16 domain = | 171 const base::string16 domain = |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 views::Button* sender, | 263 views::Button* sender, |
| 263 const ui::Event& event) { | 264 const ui::Event& event) { |
| 264 DCHECK(prompt_for_new_profile_); | 265 DCHECK(prompt_for_new_profile_); |
| 265 DCHECK_EQ(continue_signin_button_, sender); | 266 DCHECK_EQ(continue_signin_button_, sender); |
| 266 if (delegate_) { | 267 if (delegate_) { |
| 267 delegate_->OnContinueSignin(); | 268 delegate_->OnContinueSignin(); |
| 268 delegate_ = NULL; | 269 delegate_ = NULL; |
| 269 } | 270 } |
| 270 GetWidget()->Close(); | 271 GetWidget()->Close(); |
| 271 } | 272 } |
| OLD | NEW |