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

Unified Diff: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc

Issue 2020623004: ash: Move shelf alignment and auto-hide calls from Shell to Shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
diff --git a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
index 93edf23b59b53cc060f05635ccdf2951fff9ecaf..51bc8848270124f17e08d4616feb071c4145a6bd 100644
--- a/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
+++ b/chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.h"
+#include "ash/root_window_controller.h"
+#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
@@ -33,7 +35,7 @@ const int kTopInset = 10;
// Dialog for an aborted multi-profile session due to a user policy change .
class MultiprofilesSessionAbortedView : public views::DialogDelegateView {
public:
- explicit MultiprofilesSessionAbortedView();
+ MultiprofilesSessionAbortedView();
~MultiprofilesSessionAbortedView() override;
static void ShowDialog(const std::string& user_email);
@@ -78,11 +80,11 @@ void MultiprofilesSessionAbortedView::ShowDialog(
// Since this is the last thing the user ever sees, we also hide all system
// tray's from the screen.
- aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
- for (aura::Window::Windows::const_iterator iter = root_windows.begin();
- iter != root_windows.end(); ++iter) {
- ash::Shell::GetInstance()->SetShelfAutoHideBehavior(
- ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN, *iter);
+ std::vector<ash::RootWindowController*> controllers =
+ ash::Shell::GetAllRootWindowControllers();
+ for (ash::RootWindowController* controller : controllers) {
+ controller->GetShelf()->SetAutoHideBehavior(
+ ash::SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
}
}
« no previous file with comments | « chrome/browser/chromeos/first_run/steps/tray_step.cc ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698