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/shelf.h" | 7 #include "ash/aura/wm_shelf_aura.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" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/lifetime/application_lifetime.h" | 12 #include "chrome/browser/lifetime/application_lifetime.h" |
13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/views/controls/button/checkbox.h" | 16 #include "ui/views/controls/button/checkbox.h" |
17 #include "ui/views/controls/label.h" | 17 #include "ui/views/controls/label.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { |
86 controller->GetShelf()->SetAutoHideBehavior( | 86 controller->wm_shelf_aura()->SetAutoHideBehavior( |
87 ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN); | 87 ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 bool MultiprofilesSessionAbortedView::Accept() { | 91 bool MultiprofilesSessionAbortedView::Accept() { |
92 chrome::AttemptUserExit(); | 92 chrome::AttemptUserExit(); |
93 return true; | 93 return true; |
94 } | 94 } |
95 | 95 |
96 int MultiprofilesSessionAbortedView::GetDialogButtons() const { | 96 int MultiprofilesSessionAbortedView::GetDialogButtons() const { |
(...skipping 54 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 |