| OLD | NEW |
| 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_session_aborted_dialog.
h" | 5 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/wm_shelf.h" | 7 #include "ash/common/shelf/wm_shelf.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 MultiprofilesSessionAbortedView::~MultiprofilesSessionAbortedView() { | 66 MultiprofilesSessionAbortedView::~MultiprofilesSessionAbortedView() { |
| 67 } | 67 } |
| 68 | 68 |
| 69 // static | 69 // static |
| 70 void MultiprofilesSessionAbortedView::ShowDialog( | 70 void MultiprofilesSessionAbortedView::ShowDialog( |
| 71 const std::string& user_email) { | 71 const std::string& user_email) { |
| 72 MultiprofilesSessionAbortedView* dialog_view = | 72 MultiprofilesSessionAbortedView* dialog_view = |
| 73 new MultiprofilesSessionAbortedView(); | 73 new MultiprofilesSessionAbortedView(); |
| 74 views::DialogDelegate::CreateDialogWidget( | 74 views::DialogDelegate::CreateDialogWidget( |
| 75 dialog_view, ash::Shell::GetTargetRootWindow(), NULL); | 75 dialog_view, ash::Shell::GetRootWindowForNewWindows(), NULL); |
| 76 dialog_view->InitDialog(user_email); | 76 dialog_view->InitDialog(user_email); |
| 77 views::Widget* widget = dialog_view->GetWidget(); | 77 views::Widget* widget = dialog_view->GetWidget(); |
| 78 DCHECK(widget); | 78 DCHECK(widget); |
| 79 widget->Show(); | 79 widget->Show(); |
| 80 | 80 |
| 81 // Since this is the last thing the user ever sees, we also hide all system | 81 // Since this is the last thing the user ever sees, we also hide all system |
| 82 // tray's from the screen. | 82 // tray's from the screen. |
| 83 std::vector<ash::RootWindowController*> controllers = | 83 std::vector<ash::RootWindowController*> controllers = |
| 84 ash::Shell::GetAllRootWindowControllers(); | 84 ash::Shell::GetAllRootWindowControllers(); |
| 85 for (ash::RootWindowController* controller : controllers) { | 85 for (ash::RootWindowController* controller : controllers) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } // namespace | 151 } // namespace |
| 152 | 152 |
| 153 //////////////////////////////////////////////////////////////////////////////// | 153 //////////////////////////////////////////////////////////////////////////////// |
| 154 // Factory function. | 154 // Factory function. |
| 155 | 155 |
| 156 void ShowMultiprofilesSessionAbortedDialog(const std::string& user_email) { | 156 void ShowMultiprofilesSessionAbortedDialog(const std::string& user_email) { |
| 157 MultiprofilesSessionAbortedView::ShowDialog(user_email); | 157 MultiprofilesSessionAbortedView::ShowDialog(user_email); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace chromeos | 160 } // namespace chromeos |
| OLD | NEW |