OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/launcher/launcher_tooltip_manager.h" | 5 #include "ash/launcher/launcher_tooltip_manager.h" |
6 | 6 |
7 #include "ash/launcher/launcher_view.h" | 7 #include "ash/launcher/launcher_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/session_state_controller.h" | 10 #include "ash/wm/session_state_controller.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 if (event == SessionStateObserver::EVENT_PRELOCK_ANIMATION_STARTED || | 318 if (event == SessionStateObserver::EVENT_PRELOCK_ANIMATION_STARTED || |
319 event == SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED) | 319 event == SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED) |
320 Close(); | 320 Close(); |
321 } | 321 } |
322 | 322 |
323 void LauncherTooltipManager::WillDeleteShelf() { | 323 void LauncherTooltipManager::WillDeleteShelf() { |
324 shelf_layout_manager_ = NULL; | 324 shelf_layout_manager_ = NULL; |
325 } | 325 } |
326 | 326 |
327 void LauncherTooltipManager::WillChangeVisibilityState( | 327 void LauncherTooltipManager::WillChangeVisibilityState( |
328 ShelfLayoutManager::VisibilityState new_state) { | 328 ShelfVisibilityState new_state) { |
329 if (new_state == ShelfLayoutManager::HIDDEN) { | 329 if (new_state == SHELF_HIDDEN) { |
330 StopTimer(); | 330 StopTimer(); |
331 Close(); | 331 Close(); |
332 } | 332 } |
333 } | 333 } |
334 | 334 |
335 void LauncherTooltipManager::OnAutoHideStateChanged( | 335 void LauncherTooltipManager::OnAutoHideStateChanged( |
336 ShelfLayoutManager::AutoHideState new_state) { | 336 ShelfAutoHideState new_state) { |
337 if (new_state == ShelfLayoutManager::AUTO_HIDE_HIDDEN) { | 337 if (new_state == SHELF_AUTO_HIDE_HIDDEN) { |
338 StopTimer(); | 338 StopTimer(); |
339 // AutoHide state change happens during an event filter, so immediate close | 339 // AutoHide state change happens during an event filter, so immediate close |
340 // may cause a crash in the HandleMouseEvent() after the filter. So we just | 340 // may cause a crash in the HandleMouseEvent() after the filter. So we just |
341 // schedule the Close here. | 341 // schedule the Close here. |
342 CloseSoon(); | 342 CloseSoon(); |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 void LauncherTooltipManager::CancelHidingAnimation() { | 346 void LauncherTooltipManager::CancelHidingAnimation() { |
347 if (!widget_ || !widget_->GetNativeView()) | 347 if (!widget_ || !widget_->GetNativeView()) |
(...skipping 30 matching lines...) Expand all Loading... |
378 | 378 |
379 gfx::NativeView native_view = widget_->GetNativeView(); | 379 gfx::NativeView native_view = widget_->GetNativeView(); |
380 views::corewm::SetWindowVisibilityAnimationType( | 380 views::corewm::SetWindowVisibilityAnimationType( |
381 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 381 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
382 views::corewm::SetWindowVisibilityAnimationTransition( | 382 views::corewm::SetWindowVisibilityAnimationTransition( |
383 native_view, views::corewm::ANIMATE_HIDE); | 383 native_view, views::corewm::ANIMATE_HIDE); |
384 } | 384 } |
385 | 385 |
386 } // namespace internal | 386 } // namespace internal |
387 } // namespace ash | 387 } // namespace ash |
OLD | NEW |