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

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: Revert changes to c/b/chromeos files for now. 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ui::CheckShouldPromptForNewProfile( 91 ui::CheckShouldPromptForNewProfile(
92 profile, 92 profile,
93 // This callback is guaranteed to be invoked, and once it is, the dialog 93 // This callback is guaranteed to be invoked, and once it is, the dialog
94 // owns itself. 94 // owns itself.
95 base::Bind(&ProfileSigninConfirmationDialogViews::Show, 95 base::Bind(&ProfileSigninConfirmationDialogViews::Show,
96 base::Unretained(dialog))); 96 base::Unretained(dialog)));
97 } 97 }
98 98
99 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) { 99 void ProfileSigninConfirmationDialogViews::Show(bool prompt_for_new_profile) {
100 prompt_for_new_profile_ = prompt_for_new_profile; 100 prompt_for_new_profile_ = prompt_for_new_profile;
101 CreateDialogWidget(this, NULL, browser_->window()->GetNativeWindow())->Show(); 101 CreateBrowserModalDialogViews(
102 this, browser_->window()->GetNativeWindow())->Show();
102 } 103 }
103 104
104 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const { 105 string16 ProfileSigninConfirmationDialogViews::GetWindowTitle() const {
105 return l10n_util::GetStringUTF16( 106 return l10n_util::GetStringUTF16(
106 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE); 107 IDS_ENTERPRISE_SIGNIN_TITLE_NEW_STYLE);
107 } 108 }
108 109
109 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel( 110 string16 ProfileSigninConfirmationDialogViews::GetDialogButtonLabel(
110 ui::DialogButton button) const { 111 ui::DialogButton button) const {
111 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? 112 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ?
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 const ui::Range& range, 225 const ui::Range& range,
225 int event_flags) { 226 int event_flags) {
226 chrome::NavigateParams params( 227 chrome::NavigateParams params(
227 browser_, 228 browser_,
228 GURL("http://support.google.com/chromeos/bin/answer.py?answer=1331549"), 229 GURL("http://support.google.com/chromeos/bin/answer.py?answer=1331549"),
229 content::PAGE_TRANSITION_LINK); 230 content::PAGE_TRANSITION_LINK);
230 params.disposition = NEW_POPUP; 231 params.disposition = NEW_POPUP;
231 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 232 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
232 chrome::Navigate(&params); 233 chrome::Navigate(&params);
233 } 234 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | chrome/browser/ui/views/update_recommended_message_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698