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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (launcher_view_->ShouldHideTooltip(location_in_launcher_view) && | 271 if (launcher_view_->ShouldHideTooltip(location_in_launcher_view) && |
272 !bubble_rect.Contains(location_on_screen)) { | 272 !bubble_rect.Contains(location_on_screen)) { |
273 // Because this mouse event may arrive to |view_|, here we just schedule | 273 // Because this mouse event may arrive to |view_|, here we just schedule |
274 // the closing event rather than directly calling Close(). | 274 // the closing event rather than directly calling Close(). |
275 CloseSoon(); | 275 CloseSoon(); |
276 } | 276 } |
277 | 277 |
278 return ui::ER_UNHANDLED; | 278 return ui::ER_UNHANDLED; |
279 } | 279 } |
280 | 280 |
281 ui::EventResult LauncherTooltipManager::OnTouchEvent(ui::TouchEvent* event) { | 281 void LauncherTooltipManager::OnTouchEvent(ui::TouchEvent* event) { |
282 aura::Window* target = static_cast<aura::Window*>(event->target()); | 282 aura::Window* target = static_cast<aura::Window*>(event->target()); |
283 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) | 283 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) |
284 Close(); | 284 Close(); |
285 return ui::ER_UNHANDLED; | |
286 } | 285 } |
287 | 286 |
288 void LauncherTooltipManager::OnGestureEvent(ui::GestureEvent* event) { | 287 void LauncherTooltipManager::OnGestureEvent(ui::GestureEvent* event) { |
289 if (widget_ && widget_->IsVisible()) { | 288 if (widget_ && widget_->IsVisible()) { |
290 // Because this mouse event may arrive to |view_|, here we just schedule | 289 // Because this mouse event may arrive to |view_|, here we just schedule |
291 // the closing event rather than directly calling Close(). | 290 // the closing event rather than directly calling Close(). |
292 CloseSoon(); | 291 CloseSoon(); |
293 } | 292 } |
294 } | 293 } |
295 | 294 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 362 |
364 gfx::NativeView native_view = widget_->GetNativeView(); | 363 gfx::NativeView native_view = widget_->GetNativeView(); |
365 views::corewm::SetWindowVisibilityAnimationType( | 364 views::corewm::SetWindowVisibilityAnimationType( |
366 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 365 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
367 views::corewm::SetWindowVisibilityAnimationTransition( | 366 views::corewm::SetWindowVisibilityAnimationTransition( |
368 native_view, views::corewm::ANIMATE_HIDE); | 367 native_view, views::corewm::ANIMATE_HIDE); |
369 } | 368 } |
370 | 369 |
371 } // namespace internal | 370 } // namespace internal |
372 } // namespace ash | 371 } // namespace ash |
OLD | NEW |