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

Side by Side Diff: chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.cc

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/profiles/multiprofiles_intro_dialog.h" 5 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 MultiprofilesIntroView::~MultiprofilesIntroView() { 64 MultiprofilesIntroView::~MultiprofilesIntroView() {
65 } 65 }
66 66
67 // static 67 // static
68 void MultiprofilesIntroView::ShowDialog( 68 void MultiprofilesIntroView::ShowDialog(
69 const base::Callback<void(bool)> on_accept) { 69 const base::Callback<void(bool)> on_accept) {
70 MultiprofilesIntroView* dialog_view = 70 MultiprofilesIntroView* dialog_view =
71 new MultiprofilesIntroView(on_accept); 71 new MultiprofilesIntroView(on_accept);
72 dialog_view->InitDialog(); 72 dialog_view->InitDialog();
73 views::DialogDelegate::CreateDialogWidget( 73 views::DialogDelegate::CreateDialogWidget(
74 dialog_view, ash::Shell::GetTargetRootWindow(), NULL); 74 dialog_view, ash::Shell::GetRootWindowForNewWindows(), NULL);
75 views::Widget* widget = dialog_view->GetWidget(); 75 views::Widget* widget = dialog_view->GetWidget();
76 DCHECK(widget); 76 DCHECK(widget);
77 widget->Show(); 77 widget->Show();
78 } 78 }
79 79
80 bool MultiprofilesIntroView::Accept() { 80 bool MultiprofilesIntroView::Accept() {
81 on_accept_.Run(no_show_checkbox_->checked()); 81 on_accept_.Run(no_show_checkbox_->checked());
82 return true; 82 return true;
83 } 83 }
84 84
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } // namespace 120 } // namespace
121 121
122 //////////////////////////////////////////////////////////////////////////////// 122 ////////////////////////////////////////////////////////////////////////////////
123 // Factory function. 123 // Factory function.
124 124
125 void ShowMultiprofilesIntroDialog(const base::Callback<void(bool)> on_accept) { 125 void ShowMultiprofilesIntroDialog(const base::Callback<void(bool)> on_accept) {
126 MultiprofilesIntroView::ShowDialog(on_accept); 126 MultiprofilesIntroView::ShowDialog(on_accept);
127 } 127 }
128 128
129 } // namespace chromeos 129 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698