OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/shelf/shelf_tooltip_manager.h" | 5 #include "ash/shelf/shelf_tooltip_manager.h" |
6 | 6 |
7 #include "ash/shelf/shelf_layout_manager.h" | 7 #include "ash/shelf/shelf_layout_manager.h" |
8 #include "ash/shelf/shelf_view.h" | 8 #include "ash/shelf/shelf_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 view_->SetText(text_); | 356 view_->SetText(text_); |
357 | 357 |
358 gfx::NativeView native_view = widget_->GetNativeView(); | 358 gfx::NativeView native_view = widget_->GetNativeView(); |
359 wm::SetWindowVisibilityAnimationType( | 359 wm::SetWindowVisibilityAnimationType( |
360 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 360 native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
361 wm::SetWindowVisibilityAnimationTransition( | 361 wm::SetWindowVisibilityAnimationTransition( |
362 native_view, wm::ANIMATE_HIDE); | 362 native_view, wm::ANIMATE_HIDE); |
363 } | 363 } |
364 | 364 |
365 void ShelfTooltipManager::CreateTimer(int delay_in_ms) { | 365 void ShelfTooltipManager::CreateTimer(int delay_in_ms) { |
366 base::OneShotTimer<ShelfTooltipManager>* new_timer = | 366 base::OneShotTimer* new_timer = new base::OneShotTimer(); |
367 new base::OneShotTimer<ShelfTooltipManager>(); | |
368 new_timer->Start(FROM_HERE, | 367 new_timer->Start(FROM_HERE, |
369 base::TimeDelta::FromMilliseconds(delay_in_ms), | 368 base::TimeDelta::FromMilliseconds(delay_in_ms), |
370 this, | 369 this, |
371 &ShelfTooltipManager::ShowInternal); | 370 &ShelfTooltipManager::ShowInternal); |
372 timer_.reset(new_timer); | 371 timer_.reset(new_timer); |
373 } | 372 } |
374 | 373 |
375 } // namespace ash | 374 } // namespace ash |
OLD | NEW |