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

Side by Side Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 ui::CheckShouldPromptForNewProfile( 84 ui::CheckShouldPromptForNewProfile(
85 profile, 85 profile,
86 // This callback is guaranteed to be invoked, and once it is, the dialog 86 // This callback is guaranteed to be invoked, and once it is, the dialog
87 // owns itself. 87 // owns itself.
88 base::Bind(&ProfileSigninConfirmationDialogViews::Show, 88 base::Bind(&ProfileSigninConfirmationDialogViews::Show,
89 base::Unretained(dialog))); 89 base::Unretained(dialog)));
90 } 90 }
91 91
92 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { 92 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) {
93 prompt_for_new_profile_ = prompt_for_new_profile; 93 prompt_for_new_profile_ = prompt_for_new_profile;
94 CreateBrowserModalDialogViews( 94 CreateAppModalDialogViews(
95 this, browser_->window()->GetNativeWindow())->Show(); 95 this, browser_->window()->GetNativeWindow())->Show();
96 } 96 }
97 97
98 base::string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { 98 base::string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const {
99 return l10n_util::GetStringUTF16( 99 return l10n_util::GetStringUTF16(
100 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); 100 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE);
101 } 101 }
102 102
103 base::string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( 103 base::string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel(
104 ui::DialogButton button) const { 104 ui::DialogButton button) const {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 views::Button* sender, 263 views::Button* sender,
264 const ui::Event& event) { 264 const ui::Event& event) {
265 DCHECK(prompt_for_new_profile_); 265 DCHECK(prompt_for_new_profile_);
266 DCHECK_EQ(continue_signin_button_, sender); 266 DCHECK_EQ(continue_signin_button_, sender);
267 if (delegate_) { 267 if (delegate_) {
268 delegate_->OnContinueSignin(); 268 delegate_->OnContinueSignin();
269 delegate_ = NULL; 269 delegate_ = NULL;
270 } 270 }
271 GetWidget()->Close(); 271 GetWidget()->Close();
272 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698