| 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/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 return false; | 335 return false; |
| 336 } | 336 } |
| 337 | 337 |
| 338 ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( | 338 ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( |
| 339 aura::Window* target, ui::TouchEvent* event) { | 339 aura::Window* target, ui::TouchEvent* event) { |
| 340 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) | 340 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) |
| 341 Close(); | 341 Close(); |
| 342 return ui::TOUCH_STATUS_UNKNOWN; | 342 return ui::TOUCH_STATUS_UNKNOWN; |
| 343 } | 343 } |
| 344 | 344 |
| 345 ui::GestureStatus LauncherTooltipManager::PreHandleGestureEvent( | 345 ui::EventResult LauncherTooltipManager::PreHandleGestureEvent( |
| 346 aura::Window* target, ui::GestureEvent* event) { | 346 aura::Window* target, ui::GestureEvent* event) { |
| 347 if (widget_ && widget_->IsVisible()) { | 347 if (widget_ && widget_->IsVisible()) { |
| 348 // Because this mouse event may arrive to |view_|, here we just schedule | 348 // Because this mouse event may arrive to |view_|, here we just schedule |
| 349 // the closing event rather than directly calling Close(). | 349 // the closing event rather than directly calling Close(). |
| 350 CloseSoon(); | 350 CloseSoon(); |
| 351 } | 351 } |
| 352 | 352 |
| 353 return ui::GESTURE_STATUS_UNKNOWN; | 353 return ui::ER_UNHANDLED; |
| 354 } | 354 } |
| 355 | 355 |
| 356 void LauncherTooltipManager::WillDeleteShelf() { | 356 void LauncherTooltipManager::WillDeleteShelf() { |
| 357 shelf_layout_manager_ = NULL; | 357 shelf_layout_manager_ = NULL; |
| 358 } | 358 } |
| 359 | 359 |
| 360 void LauncherTooltipManager::WillChangeVisibilityState( | 360 void LauncherTooltipManager::WillChangeVisibilityState( |
| 361 ShelfLayoutManager::VisibilityState new_state) { | 361 ShelfLayoutManager::VisibilityState new_state) { |
| 362 if (new_state == ShelfLayoutManager::HIDDEN) { | 362 if (new_state == ShelfLayoutManager::HIDDEN) { |
| 363 StopTimer(); | 363 StopTimer(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 view_->SetText(text_); | 409 view_->SetText(text_); |
| 410 | 410 |
| 411 gfx::NativeView native_view = widget_->GetNativeView(); | 411 gfx::NativeView native_view = widget_->GetNativeView(); |
| 412 SetWindowVisibilityAnimationType( | 412 SetWindowVisibilityAnimationType( |
| 413 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 413 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
| 414 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); | 414 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace internal | 417 } // namespace internal |
| 418 } // namespace ash | 418 } // namespace ash |
| OLD | NEW |