Commit 2f652b8c authored by Jazz Xu's avatar Jazz Xu Committed by Commit Bot

CrOS GMC: Show empty state media controls when no media playing.

This CL changes the media controls' behavior in system menu such that
it will be in an empty state instead of hiding after all media have
stopped playing.

Bug: 1133871
Change-Id: I5e42410abf121c94756e18e9a2cd0eb14375e2d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441678Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Jazz Xu <jazzhsu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813047}
parent bbcd67b8
...@@ -2590,6 +2590,10 @@ This file contains the strings for ash. ...@@ -2590,6 +2590,10 @@ This file contains the strings for ash.
Pin to shelf Pin to shelf
</message> </message>
<message name="IDS_ASH_GLOBAL_MEDIA_CONTROLS_NO_MEDIA_TEXT" desc="Text indicating no media is currently playing.">
No media playing
</message>
<!-- Power off menu --> <!-- Power off menu -->
<message name="IDS_ASH_POWER_BUTTON_MENU_POWER_OFF_BUTTON" desc="Text shown on power off button in power button menu."> <message name="IDS_ASH_POWER_BUTTON_MENU_POWER_OFF_BUTTON" desc="Text shown on power off button in power button menu.">
Power off Power off
......
d8a52632861b5b591d9b4bf354b24c426ec91bf4
\ No newline at end of file
...@@ -77,6 +77,7 @@ aggregate_vector_icons2("ash_vector_icons") { ...@@ -77,6 +77,7 @@ aggregate_vector_icons2("ash_vector_icons") {
"login_screen_enterprise.icon", "login_screen_enterprise.icon",
"login_screen_menu_dropdown.icon", "login_screen_menu_dropdown.icon",
"mic.icon", "mic.icon",
"music_note.icon",
"muted_microphone.icon", "muted_microphone.icon",
"network_badge_captive_portal.icon", "network_badge_captive_portal.icon",
"network_badge_off.icon", "network_badge_off.icon",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
MOVE_TO, 10, 3,
R_LINE_TO, 0.01f, 7.79f,
R_ARC_TO, 3.33f, 3.33f, 0, 0, 0, -1.67f, -0.46f,
R_ARC_TO, 3.33f, 3.33f, 0, 1, 0, 0, 6.67f,
CUBIC_TO, 10.19f, 17, 12, 15.51f, 12, 13.67f,
V_LINE_TO, 6,
R_H_LINE_TO, 3,
V_LINE_TO, 3,
R_H_LINE_TO, -5,
CLOSE
...@@ -109,9 +109,12 @@ void UnifiedMediaControlsController::MediaSessionChanged( ...@@ -109,9 +109,12 @@ void UnifiedMediaControlsController::MediaSessionChanged(
// Start hide controls timer if there is no active session, wait to // Start hide controls timer if there is no active session, wait to
// see if we will receive a new session. // see if we will receive a new session.
if (!request_id.has_value()) { if (!request_id.has_value()) {
if (hide_artwork_timer_->IsRunning())
hide_artwork_timer_->Stop();
hide_controls_timer_->Start( hide_controls_timer_->Start(
FROM_HERE, kHideControlsDelay, FROM_HERE, kHideControlsDelay,
base::BindOnce(&UnifiedMediaControlsController::HideControls, base::BindOnce(&UnifiedMediaControlsController::ShowEmptyState,
base::Unretained(this))); base::Unretained(this)));
return; return;
} }
...@@ -119,6 +122,7 @@ void UnifiedMediaControlsController::MediaSessionChanged( ...@@ -119,6 +122,7 @@ void UnifiedMediaControlsController::MediaSessionChanged(
if (!media_session_id_.has_value()) if (!media_session_id_.has_value())
delegate_->ShowMediaControls(); delegate_->ShowMediaControls();
media_session_id_ = request_id; media_session_id_ = request_id;
media_controls_->OnNewMediaSession();
} }
void UnifiedMediaControlsController::MediaControllerImageChanged( void UnifiedMediaControlsController::MediaControllerImageChanged(
...@@ -175,9 +179,9 @@ void UnifiedMediaControlsController::PerformAction( ...@@ -175,9 +179,9 @@ void UnifiedMediaControlsController::PerformAction(
media_session::PerformMediaSessionAction(action, media_controller_remote_); media_session::PerformMediaSessionAction(action, media_controller_remote_);
} }
void UnifiedMediaControlsController::HideControls() { void UnifiedMediaControlsController::ShowEmptyState() {
media_session_id_ = base::nullopt; media_session_id_ = base::nullopt;
delegate_->HideMediaControls(); media_controls_->ShowEmptyState();
} }
void UnifiedMediaControlsController::FlushForTesting() { void UnifiedMediaControlsController::FlushForTesting() {
......
...@@ -30,7 +30,6 @@ class ASH_EXPORT UnifiedMediaControlsController ...@@ -30,7 +30,6 @@ class ASH_EXPORT UnifiedMediaControlsController
public: public:
virtual ~Delegate() = default; virtual ~Delegate() = default;
virtual void ShowMediaControls() = 0; virtual void ShowMediaControls() = 0;
virtual void HideMediaControls() = 0;
virtual void OnMediaControlsViewClicked() = 0; virtual void OnMediaControlsViewClicked() = 0;
}; };
...@@ -70,7 +69,7 @@ class ASH_EXPORT UnifiedMediaControlsController ...@@ -70,7 +69,7 @@ class ASH_EXPORT UnifiedMediaControlsController
} }
private: private:
void HideControls(); void ShowEmptyState();
// Weak ptr, owned by view hierarchy. // Weak ptr, owned by view hierarchy.
UnifiedMediaControlsView* media_controls_ = nullptr; UnifiedMediaControlsView* media_controls_ = nullptr;
......
...@@ -36,7 +36,6 @@ class MockMediaControlsDelegate ...@@ -36,7 +36,6 @@ class MockMediaControlsDelegate
~MockMediaControlsDelegate() override = default; ~MockMediaControlsDelegate() override = default;
void ShowMediaControls() override { visible_ = true; } void ShowMediaControls() override { visible_ = true; }
void HideMediaControls() override { visible_ = false; }
MOCK_METHOD0(OnMediaControlsViewClicked, void()); MOCK_METHOD0(OnMediaControlsViewClicked, void());
bool IsControlsVisible() { return visible_; } bool IsControlsVisible() { return visible_; }
...@@ -130,6 +129,10 @@ class UnifiedMediaControlsControllerTest : public AshTestBase { ...@@ -130,6 +129,10 @@ class UnifiedMediaControlsControllerTest : public AshTestBase {
return static_cast<views::Button*>(*it); return static_cast<views::Button*>(*it);
} }
bool IsMediaControlsInEmptyState() const {
return media_controls_->is_in_empty_state_;
}
SkPath GetArtworkClipPath() { return media_controls_->GetArtworkClipPath(); } SkPath GetArtworkClipPath() { return media_controls_->GetArtworkClipPath(); }
views::View* button_row() { return media_controls_->button_row_; } views::View* button_row() { return media_controls_->button_row_; }
...@@ -364,31 +367,123 @@ TEST_F(UnifiedMediaControlsControllerTest, HideArtwork) { ...@@ -364,31 +367,123 @@ TEST_F(UnifiedMediaControlsControllerTest, HideArtwork) {
} }
TEST_F(UnifiedMediaControlsControllerTest, TEST_F(UnifiedMediaControlsControllerTest,
ShowHideControlsOnMediaSessionChanged) { UpdateControlsStateOnMediaSessionChanged) {
auto request_id = base::UnguessableToken::Create(); auto request_id = base::UnguessableToken::Create();
EXPECT_FALSE(delegate()->IsControlsVisible()); EXPECT_FALSE(delegate()->IsControlsVisible());
controller()->MediaSessionChanged(request_id); controller()->MediaSessionChanged(request_id);
EXPECT_TRUE(delegate()->IsControlsVisible()); EXPECT_TRUE(delegate()->IsControlsVisible());
EXPECT_FALSE(IsMediaControlsInEmptyState());
controller()->MediaSessionChanged(base::nullopt); controller()->MediaSessionChanged(base::nullopt);
EXPECT_TRUE(delegate()->IsControlsVisible()); EXPECT_FALSE(IsMediaControlsInEmptyState());
// Still visible since we are within waiting delay time frame. // Still in normal state since we are within waiting delay time frame.
task_environment()->FastForwardBy( task_environment()->FastForwardBy(
base::TimeDelta::FromMilliseconds(kHideControlsDelay - 1)); base::TimeDelta::FromMilliseconds(kHideControlsDelay - 1));
EXPECT_TRUE(delegate()->IsControlsVisible()); EXPECT_FALSE(IsMediaControlsInEmptyState());
// Session resumes, controls should still be visible. // Session resumes, controls should still be in normal state.
controller()->MediaSessionChanged(request_id); controller()->MediaSessionChanged(request_id);
task_environment()->FastForwardBy(base::TimeDelta::FromMilliseconds(1)); task_environment()->FastForwardBy(base::TimeDelta::FromMilliseconds(1));
EXPECT_FALSE(IsMediaControlsInEmptyState());
// Hide controls timer expired, controls should be in empty state.
controller()->MediaSessionChanged(base::nullopt);
task_environment()->FastForwardBy(
base::TimeDelta::FromMilliseconds(kHideControlsDelay));
EXPECT_TRUE(IsMediaControlsInEmptyState());
EXPECT_TRUE(delegate()->IsControlsVisible());
}
TEST_F(UnifiedMediaControlsControllerTest, MediaControlsEmptyState) {
CreateWidget();
// Show media controls.
auto request_id = base::UnguessableToken::Create();
controller()->MediaSessionChanged(request_id);
EXPECT_TRUE(delegate()->IsControlsVisible()); EXPECT_TRUE(delegate()->IsControlsVisible());
EXPECT_FALSE(IsMediaControlsInEmptyState());
// Hide controls timer expired, controls should be hidden. EnableAction(MediaSessionAction::kPlay);
EnableAction(MediaSessionAction::kPause);
EnableAction(MediaSessionAction::kPreviousTrack);
EnableAction(MediaSessionAction::kNextTrack);
EXPECT_TRUE(artist_label()->GetVisible());
EXPECT_FALSE(artwork_view()->GetVisible());
for (views::View* button : button_row()->children())
EXPECT_TRUE(button->GetEnabled());
// Media controls should be in empty state after getting empty session.
controller()->MediaSessionChanged(base::nullopt); controller()->MediaSessionChanged(base::nullopt);
task_environment()->FastForwardBy( task_environment()->FastForwardBy(
base::TimeDelta::FromMilliseconds(kHideControlsDelay)); base::TimeDelta::FromMilliseconds(kHideControlsDelay));
EXPECT_TRUE(IsMediaControlsInEmptyState());
// When in empty state, artist label should be hidden; artwork view
// should be hidden since it was hidden before getting into empty
// state; all action buttons should be disabled.
EXPECT_FALSE(artist_label()->GetVisible());
EXPECT_FALSE(artwork_view()->GetVisible());
for (views::View* button : button_row()->children())
EXPECT_FALSE(button->GetEnabled());
// Tapping on the media controls when we are in empty state should not
// notify delegate.
EXPECT_CALL(*delegate(), OnMediaControlsViewClicked).Times(0);
ui::test::EventGenerator* generator = GetEventGenerator();
generator->MoveMouseTo(
media_controls_view()->GetBoundsInScreen().CenterPoint());
generator->ClickLeftButton();
// Media controls should get back to normal state.
controller()->MediaSessionChanged(request_id);
EXPECT_FALSE(IsMediaControlsInEmptyState());
EXPECT_TRUE(artist_label()->GetVisible());
EXPECT_FALSE(artwork_view()->GetVisible());
for (views::View* button : button_row()->children())
EXPECT_TRUE(button->GetEnabled());
// User should be able to tap the controls for detailed view again.
EXPECT_CALL(*delegate(), OnMediaControlsViewClicked).Times(1);
generator->ClickLeftButton();
}
TEST_F(UnifiedMediaControlsControllerTest, MediaControlsEmptyStateWithArtwork) {
auto request_id = base::UnguessableToken::Create();
EXPECT_FALSE(delegate()->IsControlsVisible()); EXPECT_FALSE(delegate()->IsControlsVisible());
controller()->MediaSessionChanged(request_id);
EXPECT_TRUE(delegate()->IsControlsVisible());
EXPECT_FALSE(IsMediaControlsInEmptyState());
// Artwork changed, and artwork view should have an empty background in normal
// state.
SkBitmap artwork;
artwork.allocN32Pixels(40, 40);
controller()->MediaControllerImageChanged(
media_session::mojom::MediaSessionImageType::kArtwork, artwork);
EXPECT_TRUE(artwork_view()->GetVisible());
EXPECT_EQ(artwork_view()->background(), nullptr);
controller()->MediaSessionChanged(base::nullopt);
task_environment()->FastForwardBy(
base::TimeDelta::FromMilliseconds(kHideControlsDelay));
// Artwork view should still be visible and have an background in empty state.
EXPECT_TRUE(IsMediaControlsInEmptyState());
EXPECT_TRUE(artwork_view()->GetVisible());
EXPECT_NE(artwork_view()->background(), nullptr);
// Session and artwork updated, artwotk view should be back in normal state.
controller()->MediaSessionChanged(request_id);
controller()->MediaControllerImageChanged(
media_session::mojom::MediaSessionImageType::kArtwork, artwork);
EXPECT_TRUE(artwork_view()->GetVisible());
EXPECT_EQ(artwork_view()->background(), nullptr);
} }
TEST_F(UnifiedMediaControlsControllerTest, FreezeControlsWhenUpdateSession) { TEST_F(UnifiedMediaControlsControllerTest, FreezeControlsWhenUpdateSession) {
......
...@@ -41,6 +41,7 @@ constexpr int kTrackTitleFontSizeIncrease = 1; ...@@ -41,6 +41,7 @@ constexpr int kTrackTitleFontSizeIncrease = 1;
constexpr gfx::Insets kTrackColumnInsets = gfx::Insets(1, 0, 1, 0); constexpr gfx::Insets kTrackColumnInsets = gfx::Insets(1, 0, 1, 0);
constexpr gfx::Insets kMediaControlsViewInsets = gfx::Insets(8, 8, 8, 12); constexpr gfx::Insets kMediaControlsViewInsets = gfx::Insets(8, 8, 8, 12);
constexpr gfx::Size kEmptyArtworkIconSize = gfx::Size(20, 20);
constexpr gfx::Size kArtworkSize = gfx::Size(40, 40); constexpr gfx::Size kArtworkSize = gfx::Size(40, 40);
constexpr gfx::Size kMediaButtonSize = gfx::Size(32, 32); constexpr gfx::Size kMediaButtonSize = gfx::Size(32, 32);
...@@ -116,6 +117,12 @@ void UnifiedMediaControlsView::MediaActionButton::SetAction( ...@@ -116,6 +117,12 @@ void UnifiedMediaControlsView::MediaActionButton::SetAction(
GetVectorIconForMediaAction(action), kMediaButtonIconSize, GetVectorIconForMediaAction(action), kMediaButtonIconSize,
AshColorProvider::Get()->GetContentLayerColor( AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary))); AshColorProvider::ContentLayerType::kIconColorPrimary)));
SetImage(views::Button::STATE_DISABLED,
CreateVectorIcon(
GetVectorIconForMediaAction(action), kMediaButtonIconSize,
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorSecondary)));
} }
std::unique_ptr<views::InkDrop> std::unique_ptr<views::InkDrop>
...@@ -186,7 +193,7 @@ UnifiedMediaControlsView::UnifiedMediaControlsView( ...@@ -186,7 +193,7 @@ UnifiedMediaControlsView::UnifiedMediaControlsView(
kUnifiedMenuMoreIcon, kUnifiedMenuMoreIcon,
AshColorProvider::Get()->GetContentLayerColor( AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary))); AshColorProvider::ContentLayerType::kIconColorPrimary)));
title_row->AddChildView(std::move(drop_down_icon)); drop_down_icon_ = title_row->AddChildView(std::move(drop_down_icon));
title_row_layout->SetFlexForView(title_label_, 1); title_row_layout->SetFlexForView(title_label_, 1);
track_column->AddChildView(std::move(title_row)); track_column->AddChildView(std::move(title_row));
...@@ -223,6 +230,9 @@ UnifiedMediaControlsView::UnifiedMediaControlsView( ...@@ -223,6 +230,9 @@ UnifiedMediaControlsView::UnifiedMediaControlsView(
void UnifiedMediaControlsView::ButtonPressed(views::Button* sender, void UnifiedMediaControlsView::ButtonPressed(views::Button* sender,
const ui::Event& event) { const ui::Event& event) {
if (is_in_empty_state_)
return;
if (sender == this) { if (sender == this) {
controller_->OnMediaControlsViewClicked(); controller_->OnMediaControlsViewClicked();
return; return;
...@@ -286,15 +296,66 @@ void UnifiedMediaControlsView::UpdateActionButtonAvailability( ...@@ -286,15 +296,66 @@ void UnifiedMediaControlsView::UpdateActionButtonAvailability(
button_row_->InvalidateLayout(); button_row_->InvalidateLayout();
} }
SkPath UnifiedMediaControlsView::GetArtworkClipPath() { void UnifiedMediaControlsView::ShowEmptyState() {
is_in_empty_state_ = true;
title_label_->SetText(
l10n_util::GetStringUTF16(IDS_ASH_GLOBAL_MEDIA_CONTROLS_NO_MEDIA_TEXT));
title_label_->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary));
artist_label_->SetVisible(false);
drop_down_icon_->SetVisible(false);
for (views::View* button : button_row_->children())
button->SetEnabled(false);
InvalidateLayout();
if (!artwork_view_->GetVisible())
return;
artwork_view_->SetBackground(views::CreateSolidBackground(
AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::
kControlBackgroundColorInactive)));
artwork_view_->SetImageSize(kEmptyArtworkIconSize);
artwork_view_->SetImage(CreateVectorIcon(
kMusicNoteIcon, kEmptyArtworkIconSize.width(),
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorSecondary)));
artwork_view_->SetClipPath(GetArtworkClipPath(kArtworkSize));
}
void UnifiedMediaControlsView::OnNewMediaSession() {
if (!is_in_empty_state_)
return;
is_in_empty_state_ = false;
title_label_->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary));
artist_label_->SetVisible(true);
drop_down_icon_->SetVisible(true);
for (views::View* button : button_row_->children())
button->SetEnabled(true);
InvalidateLayout();
if (!artwork_view_->GetVisible())
return;
artwork_view_->SetBackground(nullptr);
}
SkPath UnifiedMediaControlsView::GetArtworkClipPath(
base::Optional<gfx::Size> image_size) {
// Calculate image bounds since we might need to draw this when image is // Calculate image bounds since we might need to draw this when image is
// not visible (i.e. when quick setting bubble is collapsed). // not visible (i.e. when quick setting bubble is collapsed).
gfx::Size image_size = artwork_view_->GetImageBounds().size(); if (!image_size.has_value())
int x = (kArtworkSize.width() - image_size.width()) / 2; image_size = artwork_view_->GetImageBounds().size();
int y = (kArtworkSize.height() - image_size.height()) / 2; int x = (kArtworkSize.width() - image_size->width()) / 2;
int y = (kArtworkSize.height() - image_size->height()) / 2;
SkPath path; SkPath path;
path.addRoundRect(gfx::RectToSkRect(gfx::Rect(x, y, image_size.width(), path.addRoundRect(gfx::RectToSkRect(gfx::Rect(x, y, image_size->width(),
image_size.height())), image_size->height())),
kArtworkCornerRadius, kArtworkCornerRadius); kArtworkCornerRadius, kArtworkCornerRadius);
return path; return path;
} }
......
...@@ -43,6 +43,13 @@ class ASH_EXPORT UnifiedMediaControlsView : public views::Button, ...@@ -43,6 +43,13 @@ class ASH_EXPORT UnifiedMediaControlsView : public views::Button,
const base::flat_set<media_session::mojom::MediaSessionAction>& const base::flat_set<media_session::mojom::MediaSessionAction>&
enabled_actions); enabled_actions);
// Show an empty state representing no media is playing.
void ShowEmptyState();
// Called when receiving new media session, update controls to normal state
// if necessary.
void OnNewMediaSession();
views::ImageView* artwork_view() { return artwork_view_; } views::ImageView* artwork_view() { return artwork_view_; }
private: private:
...@@ -65,15 +72,19 @@ class ASH_EXPORT UnifiedMediaControlsView : public views::Button, ...@@ -65,15 +72,19 @@ class ASH_EXPORT UnifiedMediaControlsView : public views::Button,
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
}; };
SkPath GetArtworkClipPath(); SkPath GetArtworkClipPath(
base::Optional<gfx::Size> image_size = base::nullopt);
UnifiedMediaControlsController* const controller_ = nullptr; UnifiedMediaControlsController* const controller_ = nullptr;
views::ImageView* artwork_view_ = nullptr; views::ImageView* artwork_view_ = nullptr;
views::ImageView* drop_down_icon_ = nullptr;
views::Label* title_label_ = nullptr; views::Label* title_label_ = nullptr;
views::Label* artist_label_ = nullptr; views::Label* artist_label_ = nullptr;
MediaActionButton* play_pause_button_ = nullptr; MediaActionButton* play_pause_button_ = nullptr;
views::View* button_row_ = nullptr; views::View* button_row_ = nullptr;
bool is_in_empty_state_ = false;
}; };
} // namespace ash } // namespace ash
......
...@@ -430,10 +430,6 @@ void UnifiedSystemTrayController::ShowMediaControls() { ...@@ -430,10 +430,6 @@ void UnifiedSystemTrayController::ShowMediaControls() {
unified_view_->ShowMediaControls(); unified_view_->ShowMediaControls();
} }
void UnifiedSystemTrayController::HideMediaControls() {
unified_view_->HideMediaControls();
}
void UnifiedSystemTrayController::OnMediaControlsViewClicked() { void UnifiedSystemTrayController::OnMediaControlsViewClicked() {
ShowMediaControlsDetailedView(); ShowMediaControlsDetailedView();
} }
......
...@@ -134,7 +134,6 @@ class ASH_EXPORT UnifiedSystemTrayController ...@@ -134,7 +134,6 @@ class ASH_EXPORT UnifiedSystemTrayController
// UnifedMediaControlsController::Delegate; // UnifedMediaControlsController::Delegate;
void ShowMediaControls() override; void ShowMediaControls() override;
void HideMediaControls() override;
void OnMediaControlsViewClicked() override; void OnMediaControlsViewClicked() override;
UnifiedSystemTrayModel* model() { return model_; } UnifiedSystemTrayModel* model() { return model_; }
......
...@@ -292,11 +292,6 @@ void UnifiedSystemTrayView::ShowMediaControls() { ...@@ -292,11 +292,6 @@ void UnifiedSystemTrayView::ShowMediaControls() {
PreferredSizeChanged(); PreferredSizeChanged();
} }
void UnifiedSystemTrayView::HideMediaControls() {
media_controls_container_->SetShouldShowMediaControls(false);
PreferredSizeChanged();
}
void UnifiedSystemTrayView::SetDetailedView(views::View* detailed_view) { void UnifiedSystemTrayView::SetDetailedView(views::View* detailed_view) {
auto system_tray_size = system_tray_container_->GetPreferredSize(); auto system_tray_size = system_tray_container_->GetPreferredSize();
system_tray_container_->SetVisible(false); system_tray_container_->SetVisible(false);
......
...@@ -130,9 +130,8 @@ class ASH_EXPORT UnifiedSystemTrayView : public views::View, ...@@ -130,9 +130,8 @@ class ASH_EXPORT UnifiedSystemTrayView : public views::View,
// Settings). // Settings).
bool IsDetailedViewShown() const; bool IsDetailedViewShown() const;
// Show and hide media controls view. // Show media controls view.
void ShowMediaControls(); void ShowMediaControls();
void HideMediaControls();
// views::View: // views::View:
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
......
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