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

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

Issue 16374006: Place browser-modal dialogs like web-contents-modal dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes and cleanup. Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ui::CheckShouldPromptForNewProfile( 106 ui::CheckShouldPromptForNewProfile(
107 profile, 107 profile,
108 // This callback is guaranteed to be invoked, and once it is, the dialog 108 // This callback is guaranteed to be invoked, and once it is, the dialog
109 // owns itself. 109 // owns itself.
110 base::Bind(&ProfileSigninConfirmationDialogViews::Show, 110 base::Bind(&ProfileSigninConfirmationDialogViews::Show,
111 base::Unretained(dialog))); 111 base::Unretained(dialog)));
112 } 112 }
113 113
114 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { 114 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) {
115 prompt_for_new_profile_ = prompt_for_new_profile; 115 prompt_for_new_profile_ = prompt_for_new_profile;
116 CreateDialogWidget(this, NULL, browser_->window()->GetNativeWindow())->Show(); 116 CreateBrowserModalDialogViews(
117 this, browser_->window()->GetNativeWindow())->Show();
117 } 118 }
118 119
119 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { 120 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const {
120 return l10n_util::GetStringUTF16( 121 return l10n_util::GetStringUTF16(
121 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); 122 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE);
122 } 123 }
123 124
124 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( 125 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel(
125 ui::DialogButton button) const { 126 ui::DialogButton button) const {
126 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? 127 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ?
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 params.disposition = NEW_POPUP; 246 params.disposition = NEW_POPUP;
246 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 247 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
247 chrome::Navigate(&params); 248 chrome::Navigate(&params);
248 } 249 }
249 250
250 void ProfileSigninConfirmationDialogViews::ResetCallbacks() { 251 void ProfileSigninConfirmationDialogViews::ResetCallbacks() {
251 cancel_signin_.Reset(); 252 cancel_signin_.Reset();
252 continue_signin_.Reset(); 253 continue_signin_.Reset();
253 signin_with_new_profile_.Reset(); 254 signin_with_new_profile_.Reset();
254 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698