Commit 4151e9e4 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS: Remove unnecessary namespace prefixes in ash/system

This is a pure cleanup with no expected behavior change.

Change-Id: I843327b4881f3321de0a12f9aa391ef1bb15b4cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978181Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727990}
parent ff95d8d1
......@@ -54,7 +54,7 @@ AccessibilityFeatureDisableDialog::AccessibilityFeatureDisableDialog(
views::Widget* widget = CreateDialogWidget(
this, nullptr,
Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), container_id));
Shell::GetContainer(Shell::GetPrimaryRootWindow(), container_id));
widget->Show();
}
......
......@@ -25,7 +25,7 @@ AccessibilityFeaturePodController::~AccessibilityFeaturePodController() =
FeaturePodButton* AccessibilityFeaturePodController::CreateButton() {
auto* button = new FeaturePodButton(this, /*is_togglable=*/false);
button->SetID(ash::VIEW_ID_ACCESSIBILITY_TRAY_ITEM);
button->SetID(VIEW_ID_ACCESSIBILITY_TRAY_ITEM);
button->SetLabel(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBILITY));
button->SetVectorIcon(kUnifiedMenuAccessibilityIcon);
......
......@@ -94,19 +94,19 @@ void SelectToSpeakTray::CheckStatusAndUpdateIcon() {
return;
}
ash::SelectToSpeakState state =
SelectToSpeakState state =
Shell::Get()->accessibility_controller()->GetSelectToSpeakState();
switch (state) {
case ash::SelectToSpeakState::kSelectToSpeakStateInactive:
case SelectToSpeakState::kSelectToSpeakStateInactive:
icon_->SetImage(inactive_image_);
SetIsActive(false);
break;
case ash::SelectToSpeakState::kSelectToSpeakStateSelecting:
case SelectToSpeakState::kSelectToSpeakStateSelecting:
// Activate the start selection button during selection.
icon_->SetImage(selecting_image_);
SetIsActive(true);
break;
case ash::SelectToSpeakState::kSelectToSpeakStateSpeaking:
case SelectToSpeakState::kSelectToSpeakStateSpeaking:
icon_->SetImage(speaking_image_);
SetIsActive(true);
break;
......
......@@ -298,7 +298,7 @@ void BluetoothNotificationController::OnGetAdapter(
void BluetoothNotificationController::NotifyAdapterDiscoverable() {
message_center::RichNotificationData optional;
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
kBluetoothDeviceDiscoverableNotificationId, base::string16() /* title */,
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERABLE,
......@@ -324,7 +324,7 @@ void BluetoothNotificationController::NotifyPairing(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_REJECT)));
}
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
kBluetoothDevicePairingNotificationId, base::string16() /* title */,
message, base::string16() /* display source */, GURL(),
......@@ -350,7 +350,7 @@ void BluetoothNotificationController::NotifyPairedDevice(
false /* by_user */);
}
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, GetPairedNotificationId(device),
base::string16() /* title */,
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_PAIRED,
......
......@@ -575,7 +575,7 @@ void ArcNotificationManager::SetNotificationConfiguration() {
NotificationConfigurationPtr configuration = NotificationConfiguration::New();
configuration->expansion_animation =
ash::features::IsNotificationExpansionAnimationEnabled();
features::IsNotificationExpansionAnimationEnabled();
notifications_instance->SetNotificationConfiguration(
std::move(configuration));
......
......@@ -147,7 +147,7 @@ void AutoConnectNotifier::OnAutoConnectedInitiated(int auto_connect_reasons) {
void AutoConnectNotifier::DisplayNotification(
const chromeos::NetworkState* network) {
NET_LOG(EVENT) << "Show AutoConnect Notification for: " << network->name();
auto notification = ash::CreateSystemNotification(
auto notification = CreateSystemNotification(
message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE,
kAutoConnectNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_NETWORK_AUTOCONNECT_NOTIFICATION_TITLE),
......
......@@ -448,7 +448,7 @@ NetworkIconImpl* FindAndUpdateImageImpl(const NetworkStateProperties* network,
// Public interface
SkColor GetDefaultColorForIconType(IconType icon_type) {
const bool light_icon = icon_type == network_icon::ICON_TYPE_TRAY_OOBE;
const bool light_icon = icon_type == ICON_TYPE_TRAY_OOBE;
return AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconPrimary,
light_icon ? AshColorProvider::AshColorMode::kLight
......
......@@ -54,7 +54,7 @@ class TrayNetworkStateModel::Impl
: public chromeos::network_config::mojom::CrosNetworkConfigObserver {
public:
explicit Impl(TrayNetworkStateModel* model) : model_(model) {
ash::GetNetworkConfigService(
GetNetworkConfigService(
remote_cros_network_config_.BindNewPipeAndPassReceiver());
remote_cros_network_config_->AddObserver(
cros_network_config_observer_receiver_.BindNewPipeAndPassRemote());
......
......@@ -569,7 +569,7 @@ void NightLightControllerImpl::SetAmbientColorEnabled(bool enabled) {
bool NightLightControllerImpl::GetAmbientColorEnabled() const {
const bool ambient_eq_supported =
ash::features::IsAllowAmbientEQEnabled() &&
features::IsAllowAmbientEQEnabled() &&
chromeos::PowerManagerClient::Get()->SupportsAmbientColor();
return ambient_eq_supported && active_user_pref_service_ &&
active_user_pref_service_->GetBoolean(prefs::kAmbientColorEnabled);
......@@ -777,7 +777,7 @@ void NightLightControllerImpl::ShowAutoNightLightNotification() {
l10n_util::GetStringUTF16(IDS_ASH_AUTO_NIGHT_LIGHT_NOTIFY_BUTTON_TEXT)));
std::unique_ptr<message_center::Notification> notification =
ash::CreateSystemNotification(
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_AUTO_NIGHT_LIGHT_NOTIFY_TITLE),
l10n_util::GetStringUTF16(IDS_ASH_AUTO_NIGHT_LIGHT_NOTIFY_BODY),
......
......@@ -19,7 +19,7 @@ namespace ash {
class HoverHighlightView;
// A PaletteTool implementation with a standard view support.
class CommonPaletteTool : public PaletteTool, public ash::ViewClickListener {
class CommonPaletteTool : public PaletteTool, public ViewClickListener {
protected:
explicit CommonPaletteTool(Delegate* delegate);
~CommonPaletteTool() override;
......
......@@ -107,7 +107,7 @@ class ASH_EXPORT PaletteToolManager : public PaletteTool::Delegate {
void HidePalette() override;
void HidePaletteImmediately() override;
aura::Window* GetWindow() override;
void RecordPaletteOptionsUsage(ash::PaletteTrayOptions option,
void RecordPaletteOptionsUsage(PaletteTrayOptions option,
PaletteInvocationMethod method) override;
void RecordPaletteModeCancellation(PaletteModeCancelType type) override;
......
......@@ -236,7 +236,7 @@ TEST_F(BacklightsForcedOffSetterTest,
// Initialize the transforms and the DeviceDataManager.
display::test::TouchTransformControllerTestApi(
ash::Shell::Get()->touch_transformer_controller())
Shell::Get()->touch_transformer_controller())
.touch_transform_setter()
->ConfigureTouchDevices(transforms);
......@@ -275,7 +275,7 @@ TEST_F(BacklightsForcedOffSetterTest, TouchscreensDisableOnBrightnessChange) {
// Initialize the transforms and the DeviceDataManager.
display::test::TouchTransformControllerTestApi(
ash::Shell::Get()->touch_transformer_controller())
Shell::Get()->touch_transformer_controller())
.touch_transform_setter()
->ConfigureTouchDevices(transforms);
......
......@@ -131,7 +131,7 @@ std::unique_ptr<Notification> DualRoleNotification::CreateNotification() {
Shell::Get()->system_tray_model()->client()->ShowPowerSettings();
}));
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kDualRoleNotificationId, title,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DUAL_ROLE_MESSAGE),
base::string16(), GURL(),
......
......@@ -96,7 +96,7 @@ void PowerNotificationController::OnPowerStatusChanged() {
// Factory testing may place the battery into unusual states.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
ash::switches::kAshHideNotificationsForFactory)) {
switches::kAshHideNotificationsForFactory)) {
return;
}
......@@ -131,7 +131,7 @@ bool PowerNotificationController::MaybeShowUsbChargerNotification() {
// Check if the notification needs to be created.
if (show && !usb_charger_was_connected_ && !usb_notification_dismissed_) {
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kUsbNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_TITLE),
ui::SubstituteChromeOSDeviceType(
......
......@@ -386,7 +386,7 @@ void ScreenLayoutObserver::CreateOrUpdateNotification(
return;
}
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
additional_message,
base::string16(), // display_source
......@@ -411,7 +411,7 @@ void ScreenLayoutObserver::OnDisplayConfigurationChanged() {
UpdateDisplayInfo(&old_info);
const bool current_has_unassociated_display =
ash::Shell::Get()->display_manager()->HasUnassociatedDisplay();
Shell::Get()->display_manager()->HasUnassociatedDisplay();
// Take |has_unassociated_display_| into consideration in order to avoid
// showing the notification too frequently. For example, user connects three
......
......@@ -80,7 +80,7 @@ void ScreenSecurityNotificationController::CreateNotification(
},
weak_ptr_factory_.GetWeakPtr(), is_capture));
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
is_capture ? kScreenCaptureNotificationId : kScreenShareNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_TITLE),
......
......@@ -87,7 +87,7 @@ void SessionLimitNotificationController::UpdateNotification() {
data.should_make_spoken_feedback_for_popup_updates =
(model_->limit_state() != last_limit_state_);
std::unique_ptr<message_center::Notification> notification =
ash::CreateSystemNotification(
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
ComposeNotificationTitle(),
l10n_util::GetStringUTF16(
......
......@@ -76,7 +76,7 @@ void SupervisedNotificationController::CreateOrUpdateNotification() {
return;
// Regular supervised user.
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL),
GetSupervisedUserMessage(), base::string16() /* display_source */, GURL(),
......
......@@ -16,22 +16,20 @@ namespace tray {
TimeTrayItemView::TimeTrayItemView(Shelf* shelf)
: TrayItemView(shelf), session_observer_(this) {
tray::TimeView::ClockLayout clock_layout =
shelf->IsHorizontalAlignment()
? tray::TimeView::ClockLayout::HORIZONTAL_CLOCK
: tray::TimeView::ClockLayout::VERTICAL_CLOCK;
time_view_ = new tray::TimeView(clock_layout,
Shell::Get()->system_tray_model()->clock());
TimeView::ClockLayout clock_layout =
shelf->IsHorizontalAlignment() ? TimeView::ClockLayout::HORIZONTAL_CLOCK
: TimeView::ClockLayout::VERTICAL_CLOCK;
time_view_ =
new TimeView(clock_layout, Shell::Get()->system_tray_model()->clock());
AddChildView(time_view_);
}
TimeTrayItemView::~TimeTrayItemView() = default;
void TimeTrayItemView::UpdateAlignmentForShelf(Shelf* shelf) {
tray::TimeView::ClockLayout clock_layout =
shelf->IsHorizontalAlignment()
? tray::TimeView::ClockLayout::HORIZONTAL_CLOCK
: tray::TimeView::ClockLayout::VERTICAL_CLOCK;
TimeView::ClockLayout clock_layout =
shelf->IsHorizontalAlignment() ? TimeView::ClockLayout::HORIZONTAL_CLOCK
: TimeView::ClockLayout::VERTICAL_CLOCK;
time_view_->UpdateClockLayout(clock_layout);
}
......
......@@ -23,7 +23,7 @@ class TimeTrayItemView : public TrayItemView, public SessionObserver {
~TimeTrayItemView() override;
void UpdateAlignmentForShelf(Shelf* shelf);
tray::TimeView* time_view() { return time_view_; }
TimeView* time_view() { return time_view_; }
// SessionObserver:
void OnSessionStateChanged(session_manager::SessionState state) override;
......
......@@ -59,7 +59,7 @@ void TracingNotificationController::OnTracingModeChanged() {
}
void TracingNotificationController::CreateNotification() {
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_TRACING_NOTIFICATION_TITLE),
l10n_util::GetStringUTF16(
......
......@@ -162,7 +162,7 @@ TopShortcutsView::TopShortcutsView(UnifiedSystemTrayController* controller)
container_ = new TopShortcutButtonContainer();
AddChildView(container_);
ash::Shell* shell = Shell::Get();
Shell* shell = Shell::Get();
bool is_on_login_screen =
shell->session_controller()->login_status() == LoginStatus::NOT_LOGGED_IN;
......
......@@ -35,7 +35,7 @@ class UnifiedSystemTrayView;
// case, this class calls UnifiedSystemTray::CloseBubble() to delete itself.
class ASH_EXPORT UnifiedSystemTrayBubble
: public TrayBubbleBase,
public ash::ScreenLayoutObserver,
public ScreenLayoutObserver,
public views::WidgetObserver,
public ShelfObserver,
public ::wm::ActivationChangeObserver,
......
......@@ -37,7 +37,7 @@ class UserChooserDetailedViewControllerTest : public AshTestBase {
// AshTestBase
void SetUp() override {
AshTestBase::SetUp();
tray_test_api_ = ash::SystemTrayTestApi::Create();
tray_test_api_ = SystemTrayTestApi::Create();
tray_test_api_->DisableAnimations();
}
......
......@@ -53,7 +53,7 @@ void UpdateNotificationController::OnUpdateAvailable() {
model_->notification_style() == NotificationStyle::kAdminRequired)
? message_center::SystemNotificationWarningLevel::WARNING
: message_center::SystemNotificationWarningLevel::NORMAL;
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
GetNotificationTitle(), GetNotificationMessage(),
base::string16() /* display_source */, GURL(),
......
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