Commit 51df1c17 authored by estade's avatar estade Committed by Commit bot

Remove non-cros support from ash/common/system.

BUG=666773

Review-Url: https://codereview.chromium.org/2591553002
Cr-Commit-Position: refs/heads/master@{#439856}
parent 797ecc9d
......@@ -15,6 +15,8 @@
#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/wm_shell.h"
#include "base/i18n/rtl.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
......@@ -23,11 +25,6 @@
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#endif
namespace {
// The ISO-639 code for the Hebrew locale. The help icon asset is a '?' which is
......@@ -80,7 +77,6 @@ DateDefaultView::DateDefaultView(SystemTrayItem* owner, LoginStatus login)
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_HELP));
view->AddViewToRowNonMd(help_button_, true);
#if !defined(OS_WIN)
if (login != LoginStatus::LOCKED) {
shutdown_button_ = new TrayPopupHeaderButton(
this, IDR_AURA_UBER_TRAY_SHUTDOWN, IDR_AURA_UBER_TRAY_SHUTDOWN,
......@@ -105,7 +101,6 @@ DateDefaultView::DateDefaultView(SystemTrayItem* owner, LoginStatus login)
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCK));
view->AddViewToRowNonMd(lock_button_, true);
}
#endif // !defined(OS_WIN)
}
DateDefaultView::~DateDefaultView() {}
......@@ -137,11 +132,9 @@ void DateDefaultView::ButtonPressed(views::Button* sender,
shell->RequestShutdown();
} else if (sender == lock_button_) {
shell->RecordUserMetricsAction(UMA_TRAY_LOCK_SCREEN);
#if defined(OS_CHROMEOS)
chromeos::DBusThreadManager::Get()
->GetSessionManagerClient()
->RequestLockScreen();
#endif
} else {
NOTREACHED();
}
......
......@@ -4,6 +4,8 @@
#include "ash/common/system/date/system_info_default_view.h"
#include "ash/common/system/chromeos/power/power_status.h"
#include "ash/common/system/chromeos/power/power_status_view.h"
#include "ash/common/system/date/date_view.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_popup_utils.h"
......@@ -13,11 +15,6 @@
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/power/power_status.h"
#include "ash/common/system/chromeos/power/power_status_view.h"
#endif // defined(OS_CHROMEOS)
namespace ash {
// The minimum number of menu button widths that the date view should span
......@@ -38,7 +35,6 @@ SystemInfoDefaultView::SystemInfoDefaultView(SystemTrayItem* owner,
date_view_ = new tray::DateView(owner);
tri_view_->AddView(TriView::Container::START, date_view_);
#if defined(OS_CHROMEOS)
if (PowerStatus::Get()->IsBatteryPresent()) {
power_status_view_ = new ash::PowerStatusView(false);
std::unique_ptr<views::BoxLayout> box_layout =
......@@ -55,7 +51,6 @@ SystemInfoDefaultView::SystemInfoDefaultView(SystemTrayItem* owner,
TrayPopupUtils::CreateVerticalSeparator());
tri_view_->AddView(TriView::Container::CENTER, power_status_view_);
}
#endif // defined(OS_CHROMEOS)
tri_view_->SetContainerVisible(TriView::Container::END, false);
if (TrayPopupUtils::CanOpenWebUISettings(login))
......
......@@ -11,9 +11,7 @@
#include "ui/views/view.h"
namespace ash {
#if defined(OS_CHROMEOS)
class PowerStatusView;
#endif // defined(OS_CHROMEOS)
class SystemTrayItem;
class TriView;
......@@ -48,9 +46,7 @@ class ASH_EXPORT SystemInfoDefaultView : public views::View {
tray::DateView* date_view_;
#if defined(OS_CHROMEOS)
PowerStatusView* power_status_view_ = nullptr;
#endif // defined(OS_CHROMEOS)
TriView* tri_view_;
......
......@@ -5,6 +5,7 @@
#include "ash/common/system/date/tray_date.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/chromeos/system_clock_observer.h"
#include "ash/common/system/date/date_default_view.h"
#include "ash/common/system/date/date_view.h"
#include "ash/common/system/tray/system_tray.h"
......@@ -12,20 +13,14 @@
#include "ash/common/system/tray/tray_item_view.h"
#include "ash/common/wm_shell.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/system_clock_observer.h"
#endif
namespace ash {
TrayDate::TrayDate(SystemTray* system_tray)
: SystemTrayItem(system_tray, UMA_DATE),
time_tray_(NULL),
default_view_(NULL),
login_status_(LoginStatus::NOT_LOGGED_IN) {
#if defined(OS_CHROMEOS)
system_clock_observer_.reset(new SystemClockObserver());
#endif
login_status_(LoginStatus::NOT_LOGGED_IN),
system_clock_observer_(new SystemClockObserver()) {
WmShell::Get()->system_tray_notifier()->AddClockObserver(this);
}
......@@ -66,12 +61,10 @@ views::View* TrayDate::CreateTrayView(LoginStatus status) {
views::View* TrayDate::CreateDefaultView(LoginStatus status) {
default_view_ = new DateDefaultView(this, status);
#if defined(OS_CHROMEOS)
// Save the login status we created the view with.
login_status_ = status;
OnSystemClockCanSetTimeChanged(system_clock_observer_->can_set_time());
#endif
return default_view_;
}
......
......@@ -15,9 +15,7 @@
namespace ash {
class DateDefaultView;
#if defined(OS_CHROMEOS)
class SystemClockObserver;
#endif
namespace tray {
class TimeView;
......@@ -68,9 +66,7 @@ class ASH_EXPORT TrayDate : public SystemTrayItem, public ClockObserver {
DateDefaultView* default_view_;
LoginStatus login_status_;
#if defined(OS_CHROMEOS)
std::unique_ptr<SystemClockObserver> system_clock_observer_;
#endif
DISALLOW_COPY_AND_ASSIGN(TrayDate);
};
......
......@@ -5,6 +5,7 @@
#include "ash/common/system/date/tray_system_info.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/chromeos/system_clock_observer.h"
#include "ash/common/system/date/date_view.h"
#include "ash/common/system/date/system_info_default_view.h"
#include "ash/common/system/tray/system_tray.h"
......@@ -12,20 +13,14 @@
#include "ash/common/system/tray/tray_item_view.h"
#include "ash/common/wm_shell.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/system_clock_observer.h"
#endif
namespace ash {
TraySystemInfo::TraySystemInfo(SystemTray* system_tray)
: SystemTrayItem(system_tray, UMA_DATE),
tray_view_(nullptr),
default_view_(nullptr),
login_status_(LoginStatus::NOT_LOGGED_IN) {
#if defined(OS_CHROMEOS)
system_clock_observer_.reset(new SystemClockObserver());
#endif
login_status_(LoginStatus::NOT_LOGGED_IN),
system_clock_observer_(new SystemClockObserver()) {
WmShell::Get()->system_tray_notifier()->AddClockObserver(this);
}
......@@ -60,12 +55,10 @@ views::View* TraySystemInfo::CreateTrayView(LoginStatus status) {
views::View* TraySystemInfo::CreateDefaultView(LoginStatus status) {
default_view_ = new SystemInfoDefaultView(this, status);
#if defined(OS_CHROMEOS)
// Save the login status we created the view with.
login_status_ = status;
OnSystemClockCanSetTimeChanged(system_clock_observer_->can_set_time());
#endif
return default_view_;
}
......
......@@ -5,9 +5,7 @@
#ifndef ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_
#define ASH_COMMON_SYSTEM_DATE_TRAY_SYSTEM_INFO_H_
#if defined(OS_CHROMEOS)
#include <memory>
#endif // defined(OS_CHROMEOS)
#include "ash/ash_export.h"
#include "ash/common/login_status.h"
......@@ -20,10 +18,8 @@ class Label;
}
namespace ash {
class SystemInfoDefaultView;
#if defined(OS_CHROMEOS)
class SystemClockObserver;
#endif
class SystemInfoDefaultView;
namespace tray {
class TimeView;
......@@ -61,9 +57,7 @@ class ASH_EXPORT TraySystemInfo : public SystemTrayItem, public ClockObserver {
SystemInfoDefaultView* default_view_;
LoginStatus login_status_;
#if defined(OS_CHROMEOS)
std::unique_ptr<SystemClockObserver> system_clock_observer_;
#endif
DISALLOW_COPY_AND_ASSIGN(TraySystemInfo);
};
......
......@@ -6,6 +6,11 @@
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
#include "ash/common/system/chromeos/palette/palette_tray.h"
#include "ash/common/system/chromeos/palette/palette_utils.h"
#include "ash/common/system/chromeos/session/logout_button_tray.h"
#include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
#include "ash/common/system/overview/overview_button_tray.h"
#include "ash/common/system/status_area_widget_delegate.h"
#include "ash/common/system/tray/system_tray.h"
......@@ -17,16 +22,8 @@
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "base/i18n/time_formatting.h"
#include "ui/native_theme/native_theme_dark_aura.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
#include "ash/common/system/chromeos/palette/palette_tray.h"
#include "ash/common/system/chromeos/palette/palette_utils.h"
#include "ash/common/system/chromeos/session/logout_button_tray.h"
#include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
#include "ui/display/display.h"
#endif
#include "ui/native_theme/native_theme_dark_aura.h"
namespace ash {
......@@ -36,12 +33,10 @@ StatusAreaWidget::StatusAreaWidget(WmWindow* status_container,
overview_button_tray_(nullptr),
system_tray_(nullptr),
web_notification_tray_(nullptr),
#if defined(OS_CHROMEOS)
logout_button_tray_(nullptr),
palette_tray_(nullptr),
virtual_keyboard_tray_(nullptr),
ime_menu_tray_(nullptr),
#endif
login_status_(LoginStatus::NOT_LOGGED_IN),
wm_shelf_(wm_shelf) {
views::Widget::InitParams params(
......@@ -63,25 +58,21 @@ void StatusAreaWidget::CreateTrayViews() {
AddOverviewButtonTray();
AddSystemTray();
AddWebNotificationTray();
#if defined(OS_CHROMEOS)
AddPaletteTray();
AddVirtualKeyboardTray();
AddImeMenuTray();
AddLogoutButtonTray();
#endif
SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
DCHECK(delegate);
// Initialize after all trays have been created.
system_tray_->InitializeTrayItems(delegate, web_notification_tray_);
web_notification_tray_->Initialize();
#if defined(OS_CHROMEOS)
logout_button_tray_->Initialize();
if (palette_tray_)
palette_tray_->Initialize();
virtual_keyboard_tray_->Initialize();
ime_menu_tray_->Initialize();
#endif
overview_button_tray_->Initialize();
SetShelfAlignment(system_tray_->shelf_alignment());
UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
......@@ -97,14 +88,12 @@ void StatusAreaWidget::Shutdown() {
// Must be destroyed after |web_notification_tray_|.
delete system_tray_;
system_tray_ = nullptr;
#if defined(OS_CHROMEOS)
delete ime_menu_tray_;
ime_menu_tray_ = nullptr;
delete virtual_keyboard_tray_;
virtual_keyboard_tray_ = nullptr;
delete logout_button_tray_;
logout_button_tray_ = nullptr;
#endif
delete overview_button_tray_;
overview_button_tray_ = nullptr;
}
......@@ -115,7 +104,6 @@ void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
system_tray_->SetShelfAlignment(alignment);
if (web_notification_tray_)
web_notification_tray_->SetShelfAlignment(alignment);
#if defined(OS_CHROMEOS)
if (logout_button_tray_)
logout_button_tray_->SetShelfAlignment(alignment);
if (virtual_keyboard_tray_)
......@@ -124,7 +112,6 @@ void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
ime_menu_tray_->SetShelfAlignment(alignment);
if (palette_tray_)
palette_tray_->SetShelfAlignment(alignment);
#endif
if (overview_button_tray_)
overview_button_tray_->SetShelfAlignment(alignment);
status_area_widget_delegate_->UpdateLayout();
......@@ -138,10 +125,8 @@ void StatusAreaWidget::UpdateAfterLoginStatusChange(LoginStatus login_status) {
system_tray_->UpdateAfterLoginStatusChange(login_status);
if (web_notification_tray_)
web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
#if defined(OS_CHROMEOS)
if (logout_button_tray_)
logout_button_tray_->UpdateAfterLoginStatusChange(login_status);
#endif
if (overview_button_tray_)
overview_button_tray_->UpdateAfterLoginStatusChange(login_status);
}
......@@ -152,13 +137,11 @@ bool StatusAreaWidget::ShouldShowShelf() const {
web_notification_tray_->ShouldBlockShelfAutoHide()))
return true;
#if defined(OS_CHROMEOS)
if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide())
return true;
if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide())
return true;
#endif
if (!wm_shelf_->IsVisible())
return false;
......@@ -180,13 +163,11 @@ void StatusAreaWidget::SchedulePaint() {
status_area_widget_delegate_->SchedulePaint();
web_notification_tray_->SchedulePaint();
system_tray_->SchedulePaint();
#if defined(OS_CHROMEOS)
virtual_keyboard_tray_->SchedulePaint();
logout_button_tray_->SchedulePaint();
ime_menu_tray_->SchedulePaint();
if (palette_tray_)
palette_tray_->SchedulePaint();
#endif
overview_button_tray_->SchedulePaint();
}
......@@ -205,13 +186,11 @@ void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
void StatusAreaWidget::UpdateShelfItemBackground(int alpha) {
web_notification_tray_->UpdateShelfItemBackground(alpha);
system_tray_->UpdateShelfItemBackground(alpha);
#if defined(OS_CHROMEOS)
virtual_keyboard_tray_->UpdateShelfItemBackground(alpha);
logout_button_tray_->UpdateShelfItemBackground(alpha);
ime_menu_tray_->UpdateShelfItemBackground(alpha);
if (palette_tray_)
palette_tray_->UpdateShelfItemBackground(alpha);
#endif
overview_button_tray_->UpdateShelfItemBackground(alpha);
}
......@@ -227,7 +206,6 @@ void StatusAreaWidget::AddWebNotificationTray() {
status_area_widget_delegate_->AddTray(web_notification_tray_);
}
#if defined(OS_CHROMEOS)
void StatusAreaWidget::AddLogoutButtonTray() {
logout_button_tray_ = new LogoutButtonTray(wm_shelf_);
status_area_widget_delegate_->AddTray(logout_button_tray_);
......@@ -258,7 +236,6 @@ void StatusAreaWidget::AddImeMenuTray() {
ime_menu_tray_ = new ImeMenuTray(wm_shelf_);
status_area_widget_delegate_->AddTray(ime_menu_tray_);
}
#endif
void StatusAreaWidget::AddOverviewButtonTray() {
overview_button_tray_ = new OverviewButtonTray(wm_shelf_);
......
......@@ -13,18 +13,16 @@
#include "ui/views/widget/widget.h"
namespace ash {
class ImeMenuTray;
class LogoutButtonTray;
class OverviewButtonTray;
class PaletteTray;
class StatusAreaWidgetDelegate;
class SystemTray;
class VirtualKeyboardTray;
class WebNotificationTray;
class WmShelf;
class WmWindow;
#if defined(OS_CHROMEOS)
class ImeMenuTray;
class LogoutButtonTray;
class PaletteTray;
class VirtualKeyboardTray;
#endif
class ASH_EXPORT StatusAreaWidget : public views::Widget,
public ShelfBackgroundAnimatorObserver {
......@@ -56,11 +54,9 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget,
}
OverviewButtonTray* overview_button_tray() { return overview_button_tray_; }
#if defined(OS_CHROMEOS)
PaletteTray* palette_tray() { return palette_tray_; }
ImeMenuTray* ime_menu_tray() { return ime_menu_tray_; }
#endif
WmShelf* wm_shelf() { return wm_shelf_; }
......@@ -88,12 +84,10 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget,
private:
void AddSystemTray();
void AddWebNotificationTray();
#if defined(OS_CHROMEOS)
void AddLogoutButtonTray();
void AddPaletteTray();
void AddVirtualKeyboardTray();
void AddImeMenuTray();
#endif
void AddOverviewButtonTray();
// Weak pointers to View classes that are parented to StatusAreaWidget:
......@@ -101,12 +95,10 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget,
OverviewButtonTray* overview_button_tray_;
SystemTray* system_tray_;
WebNotificationTray* web_notification_tray_;
#if defined(OS_CHROMEOS)
LogoutButtonTray* logout_button_tray_;
PaletteTray* palette_tray_;
VirtualKeyboardTray* virtual_keyboard_tray_;
ImeMenuTray* ime_menu_tray_;
#endif
LoginStatus login_status_;
WmShelf* wm_shelf_;
......
......@@ -20,9 +20,7 @@ namespace {
const char* kAlwaysShownSystemNotifierIds[] = {
kNotifierAccessibility, kNotifierDeprecatedAccelerator, kNotifierBattery,
kNotifierDisplay, kNotifierDisplayError,
#if defined(OS_CHROMEOS)
kNotifierNetworkError,
#endif
kNotifierPower,
// Note: Order doesn't matter here, so keep this in alphabetic order, don't
// just add your stuff at the end!
......@@ -31,14 +29,8 @@ const char* kAlwaysShownSystemNotifierIds[] = {
// |kAshSystemNotifiers| is the list of normal system notification sources for
// ash events. These notifications can be hidden in some context.
const char* kAshSystemNotifiers[] = {
kNotifierBluetooth, kNotifierDisplayResolutionChange,
#if defined(OS_CHROMEOS)
kNotifierDisk,
#endif
kNotifierLocale, kNotifierMultiProfileFirstRun,
#if defined(OS_CHROMEOS)
kNotifierNetwork,
#endif
kNotifierBluetooth, kNotifierDisplayResolutionChange, kNotifierDisk,
kNotifierLocale, kNotifierMultiProfileFirstRun, kNotifierNetwork,
kNotifierNetworkPortalDetector, kNotifierScreenshot, kNotifierScreenCapture,
kNotifierScreenShare, kNotifierSessionLengthTimeout,
kNotifierSupervisedUser, kNotifierWebUsb,
......
......@@ -16,6 +16,8 @@
#include "ash/common/system/tray/tray_popup_utils.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/geometry/insets.h"
......@@ -24,11 +26,6 @@
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#endif
namespace {
// The ISO-639 code for the Hebrew locale. The help icon asset is a '?' which is
......@@ -87,7 +84,6 @@ void TilesDefaultView::Init() {
AddChildView(help_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator());
#if !defined(OS_WIN)
lock_button_ =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
kSystemMenuLockIcon, IDS_ASH_STATUS_TRAY_LOCK);
......@@ -106,7 +102,6 @@ void TilesDefaultView::Init() {
bool reboot = WmShell::Get()->shutdown_controller()->reboot_on_shutdown();
power_button_->SetTooltipText(l10n_util::GetStringUTF16(
reboot ? IDS_ASH_STATUS_TRAY_REBOOT : IDS_ASH_STATUS_TRAY_SHUTDOWN));
#endif // !defined(OS_WIN)
}
void TilesDefaultView::ButtonPressed(views::Button* sender,
......@@ -121,11 +116,9 @@ void TilesDefaultView::ButtonPressed(views::Button* sender,
shell->system_tray_controller()->ShowHelp();
} else if (sender == lock_button_) {
shell->RecordUserMetricsAction(UMA_TRAY_LOCK_SCREEN);
#if defined(OS_CHROMEOS)
chromeos::DBusThreadManager::Get()
->GetSessionManagerClient()
->RequestLockScreen();
#endif
} else if (sender == power_button_) {
shell->RecordUserMetricsAction(UMA_TRAY_SHUT_DOWN);
shell->RequestShutdown();
......
......@@ -58,10 +58,8 @@ TEST_F(TrayTilesTest, ButtonStatesWithAddingUser) {
tray_tiles()->CreateDefaultViewForTesting(LoginStatus::USER));
EXPECT_EQ(GetSettingsButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetHelpButton()->state(), views::Button::STATE_DISABLED);
#if !defined(OS_WIN)
EXPECT_EQ(GetLockButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetPowerButton()->state(), views::Button::STATE_NORMAL);
#endif // !defined(OS_WIN)
}
TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusNotLoggedIn) {
......@@ -69,10 +67,8 @@ TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusNotLoggedIn) {
tray_tiles()->CreateDefaultViewForTesting(LoginStatus::NOT_LOGGED_IN));
EXPECT_EQ(GetSettingsButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetHelpButton()->state(), views::Button::STATE_DISABLED);
#if !defined(OS_WIN)
EXPECT_EQ(GetLockButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetPowerButton()->state(), views::Button::STATE_NORMAL);
#endif // !defined(OS_WIN)
}
TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusLocked) {
......@@ -80,10 +76,8 @@ TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusLocked) {
tray_tiles()->CreateDefaultViewForTesting(LoginStatus::LOCKED));
EXPECT_EQ(GetSettingsButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetHelpButton()->state(), views::Button::STATE_DISABLED);
#if !defined(OS_WIN)
EXPECT_EQ(GetLockButton()->state(), views::Button::STATE_DISABLED);
EXPECT_EQ(GetPowerButton()->state(), views::Button::STATE_NORMAL);
#endif // !defined(OS_WIN)
}
TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusUser) {
......@@ -91,10 +85,8 @@ TEST_F(TrayTilesTest, ButtonStatesWithLoginStatusUser) {
tray_tiles()->CreateDefaultViewForTesting(LoginStatus::USER));
EXPECT_EQ(GetSettingsButton()->state(), views::Button::STATE_NORMAL);
EXPECT_EQ(GetHelpButton()->state(), views::Button::STATE_NORMAL);
#if !defined(OS_WIN)
EXPECT_EQ(GetLockButton()->state(), views::Button::STATE_NORMAL);
EXPECT_EQ(GetPowerButton()->state(), views::Button::STATE_NORMAL);
#endif // !defined(OS_WIN)
}
} // namespace ash
......@@ -193,7 +193,6 @@ TEST_F(TrayUserTest, AccessibleLabelContainsMultiUserInfo) {
EXPECT_EQ(ui::AX_ROLE_BUTTON, node_data.role);
}
#if defined(OS_CHROMEOS)
// Make sure that in multi user mode the user panel can be activated and there
// will be one panel for each user plus one additional separator at the end.
// Note: the mouse watcher (for automatic closing upon leave) cannot be tested
......@@ -279,6 +278,4 @@ TEST_F(TrayUserTest, MultiUserModeButtonClicks) {
tray()->CloseSystemBubble();
}
#endif
} // namespace ash
......@@ -45,20 +45,16 @@
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/layout/fill_layout.h"
#if defined(OS_CHROMEOS)
namespace message_center {
MessageCenterTrayDelegate* CreateMessageCenterTray() {
// On Windows+Ash the Tray will not be hosted in ash::Shell.
// On non-CrOS, the Tray will not be hosted in ash::Shell.
NOTREACHED();
return nullptr;
}
} // namespace message_center
#endif // defined(OS_CHROMEOS)
namespace ash {
namespace {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment