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

Unified Diff: ash/common/shelf/shelf_widget.cc

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. Created 4 years, 2 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
« no previous file with comments | « ash/common/shelf/shelf_widget.h ('k') | ash/common/shelf/wm_shelf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_widget.cc
diff --git a/ash/common/shelf/shelf_widget.cc b/ash/common/shelf/shelf_widget.cc
index a1890f30e5cb802007dd94fafc34503b9cd41b20..187e3d20f67f23683df32e9b91192e33f6f4f81e 100644
--- a/ash/common/shelf/shelf_widget.cc
+++ b/ash/common/shelf/shelf_widget.cc
@@ -17,7 +17,6 @@
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/status_area_layout_manager.h"
#include "ash/common/system/status_area_widget.h"
-#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
@@ -378,33 +377,6 @@ bool ShelfWidget::IsShelfHiddenBehindBlackBar() const {
return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f;
}
-// static
-bool ShelfWidget::ShelfAlignmentAllowed() {
- if (WmShell::Get()->system_tray_delegate()->IsUserSupervised())
- return false;
-
- LoginStatus login_status =
- WmShell::Get()->system_tray_delegate()->GetUserLoginStatus();
-
- switch (login_status) {
- case LoginStatus::LOCKED:
- // Shelf alignment changes can be requested while being locked, but will
- // be applied upon unlock.
- case LoginStatus::USER:
- case LoginStatus::OWNER:
- return true;
- case LoginStatus::PUBLIC:
- case LoginStatus::SUPERVISED:
- case LoginStatus::GUEST:
- case LoginStatus::KIOSK_APP:
- case LoginStatus::NOT_LOGGED_IN:
- return false;
- }
-
- NOTREACHED();
- return false;
-}
-
ShelfAlignment ShelfWidget::GetAlignment() const {
return wm_shelf_->GetAlignment();
}
« no previous file with comments | « ash/common/shelf/shelf_widget.h ('k') | ash/common/shelf/wm_shelf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698