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

Unified Diff: ash/common/system/overview/overview_button_tray.cc

Issue 2499453002: Add ink drop ripple to overview mode button (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/system/overview/overview_button_tray.h ('k') | ash/common/system/tray/actionable_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/overview/overview_button_tray.cc
diff --git a/ash/common/system/overview/overview_button_tray.cc b/ash/common/system/overview/overview_button_tray.cc
index f88134f04213d3c94ee58a0624651ae6f70a7d93..fbdd95348afb54b27499b5e616a03a02a22d0da8 100644
--- a/ash/common/system/overview/overview_button_tray.cc
+++ b/ash/common/system/overview/overview_button_tray.cc
@@ -39,14 +39,15 @@ namespace ash {
OverviewButtonTray::OverviewButtonTray(WmShelf* wm_shelf)
: TrayBackgroundView(wm_shelf), icon_(nullptr) {
- SetContentsBackground();
-
icon_ = new views::ImageView();
if (MaterialDesignController::IsShelfMaterial()) {
+ SetInkDropMode(InkDropMode::ON);
+ SetContentsBackground(false);
gfx::ImageSkia image_md =
CreateVectorIcon(gfx::VectorIconId::SHELF_OVERVIEW, kShelfIconColor);
icon_->SetImage(image_md);
} else {
+ SetContentsBackground(true);
gfx::ImageSkia* image_non_md =
ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_AURA_UBER_TRAY_OVERVIEW_MODE);
@@ -71,10 +72,10 @@ void OverviewButtonTray::UpdateAfterLoginStatusChange(LoginStatus status) {
bool OverviewButtonTray::PerformAction(const ui::Event& event) {
WindowSelectorController* controller =
WmShell::Get()->window_selector_controller();
- controller->ToggleOverview();
- SetDrawBackgroundAsActive(controller->IsSelecting());
+ // Toggling overview mode will fail if there is no window to show.
+ bool performed = controller->ToggleOverview();
WmShell::Get()->RecordUserMetricsAction(UMA_TRAY_OVERVIEW);
- return true;
+ return performed;
}
void OverviewButtonTray::SessionStateChanged(
@@ -90,8 +91,12 @@ void OverviewButtonTray::OnMaximizeModeEnded() {
UpdateIconVisibility();
}
+void OverviewButtonTray::OnOverviewModeStarting() {
+ SetIsActive(true);
+}
+
void OverviewButtonTray::OnOverviewModeEnded() {
- SetDrawBackgroundAsActive(false);
+ SetIsActive(false);
}
void OverviewButtonTray::ClickedOutsideBubble() {}
« no previous file with comments | « ash/common/system/overview/overview_button_tray.h ('k') | ash/common/system/tray/actionable_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698