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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 if (launcher_view_->ShouldHideTooltip(location_in_launcher_view) && | 288 if (launcher_view_->ShouldHideTooltip(location_in_launcher_view) && |
289 !bubble_rect.Contains(location_on_screen)) { | 289 !bubble_rect.Contains(location_on_screen)) { |
290 // Because this mouse event may arrive to |view_|, here we just schedule | 290 // Because this mouse event may arrive to |view_|, here we just schedule |
291 // the closing event rather than directly calling Close(). | 291 // the closing event rather than directly calling Close(). |
292 CloseSoon(); | 292 CloseSoon(); |
293 } | 293 } |
294 | 294 |
295 return false; | 295 return false; |
296 } | 296 } |
297 | 297 |
298 ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent( | 298 ui::EventResult LauncherTooltipManager::PreHandleTouchEvent( |
299 aura::Window* target, ui::TouchEvent* event) { | 299 aura::Window* target, ui::TouchEvent* event) { |
300 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) | 300 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) |
301 Close(); | 301 Close(); |
302 return ui::TOUCH_STATUS_UNKNOWN; | 302 return ui::ER_UNHANDLED; |
303 } | 303 } |
304 | 304 |
305 ui::EventResult LauncherTooltipManager::PreHandleGestureEvent( | 305 ui::EventResult LauncherTooltipManager::PreHandleGestureEvent( |
306 aura::Window* target, ui::GestureEvent* event) { | 306 aura::Window* target, ui::GestureEvent* event) { |
307 if (widget_ && widget_->IsVisible()) { | 307 if (widget_ && widget_->IsVisible()) { |
308 // Because this mouse event may arrive to |view_|, here we just schedule | 308 // Because this mouse event may arrive to |view_|, here we just schedule |
309 // the closing event rather than directly calling Close(). | 309 // the closing event rather than directly calling Close(). |
310 CloseSoon(); | 310 CloseSoon(); |
311 } | 311 } |
312 | 312 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 view_->SetText(text_); | 369 view_->SetText(text_); |
370 | 370 |
371 gfx::NativeView native_view = widget_->GetNativeView(); | 371 gfx::NativeView native_view = widget_->GetNativeView(); |
372 SetWindowVisibilityAnimationType( | 372 SetWindowVisibilityAnimationType( |
373 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 373 native_view, WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
374 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); | 374 SetWindowVisibilityAnimationTransition(native_view, ANIMATE_HIDE); |
375 } | 375 } |
376 | 376 |
377 } // namespace internal | 377 } // namespace internal |
378 } // namespace ash | 378 } // namespace ash |
OLD | NEW |