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

Unified Diff: ash/system/tray/tray_background_view.cc

Issue 1929203002: mash: Fix crash when clicking on the shelf overflow icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/system/tray/tray_background_view.h ('k') | ash/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_background_view.cc
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index 56f20f78fff14f7073bb381db7426afbcecafa29..1f2cf2628582753c3e73b8a86ab5d18a1b8b71ab 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -265,6 +265,17 @@ void TrayBackgroundView::Initialize() {
SetTrayBorder();
}
+// static
+void TrayBackgroundView::InitializeBubbleAnimations(
+ views::Widget* bubble_widget) {
+ aura::Window* window = bubble_widget->GetNativeWindow();
+ ::wm::SetWindowVisibilityAnimationType(
+ window, ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
+ ::wm::SetWindowVisibilityAnimationTransition(window, ::wm::ANIMATE_HIDE);
+ ::wm::SetWindowVisibilityAnimationDuration(
+ window, base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs));
+}
+
void TrayBackgroundView::SetVisible(bool visible) {
if (visible == layer()->GetTargetVisibility())
return;
@@ -459,18 +470,6 @@ void TrayBackgroundView::HideTransformation() {
layer()->SetTransform(transform);
}
-void TrayBackgroundView::InitializeBubbleAnimations(
- views::Widget* bubble_widget) {
- ::wm::SetWindowVisibilityAnimationType(
- bubble_widget->GetNativeWindow(),
- ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
- ::wm::SetWindowVisibilityAnimationTransition(bubble_widget->GetNativeWindow(),
- ::wm::ANIMATE_HIDE);
- ::wm::SetWindowVisibilityAnimationDuration(
- bubble_widget->GetNativeWindow(),
- base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMs));
-}
-
aura::Window* TrayBackgroundView::GetBubbleWindowContainer() const {
return ash::Shell::GetContainer(
tray_container()->GetWidget()->GetNativeWindow()->GetRootWindow(),
« no previous file with comments | « ash/system/tray/tray_background_view.h ('k') | ash/system/tray/tray_bubble_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698