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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 !bubble_rect.Contains(location_on_screen)) { | 325 !bubble_rect.Contains(location_on_screen)) { |
326 // Because this mouse event may arrive to |view_|, here we just schedule | 326 // Because this mouse event may arrive to |view_|, here we just schedule |
327 // the closing event rather than directly calling Close(). | 327 // the closing event rather than directly calling Close(). |
328 CloseSoon(); | 328 CloseSoon(); |
329 } | 329 } |
330 | 330 |
331 return false; | 331 return false; |
332 } | 332 } |
333 | 333 |
334 ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( | 334 ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( |
335 aura::Window* target, ui::TouchEventImpl* event) { | 335 aura::Window* target, ui::TouchEvent* event) { |
336 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) | 336 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) |
337 Close(); | 337 Close(); |
338 return ui::TOUCH_STATUS_UNKNOWN; | 338 return ui::TOUCH_STATUS_UNKNOWN; |
339 } | 339 } |
340 | 340 |
341 ui::GestureStatus LauncherTooltipManager::PreHandleGestureEvent( | 341 ui::GestureStatus LauncherTooltipManager::PreHandleGestureEvent( |
342 aura::Window* target, ui::GestureEventImpl* event) { | 342 aura::Window* target, ui::GestureEventImpl* event) { |
343 if (widget_ && widget_->IsVisible()) { | 343 if (widget_ && widget_->IsVisible()) { |
344 // Because this mouse event may arrive to |view_|, here we just schedule | 344 // Because this mouse event may arrive to |view_|, here we just schedule |
345 // the closing event rather than directly calling Close(). | 345 // the closing event rather than directly calling Close(). |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 view_->SetText(text_); | 405 view_->SetText(text_); |
406 | 406 |
407 gfx::NativeView native_view = widget_->GetNativeView(); | 407 gfx::NativeView native_view = widget_->GetNativeView(); |
408 SetWindowVisibilityAnimationType( | 408 SetWindowVisibilityAnimationType( |
409 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 409 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
410 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); | 410 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); |
411 } | 411 } |
412 | 412 |
413 } // namespace internal | 413 } // namespace internal |
414 } // namespace ash | 414 } // namespace ash |
OLD | NEW |