| 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/tooltips/tooltip_controller.h" | 5 #include "ash/tooltips/tooltip_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // touch events. | 298 // touch events. |
| 299 // Hide the tooltip for touch events. | 299 // Hide the tooltip for touch events. |
| 300 if (GetTooltip()->IsVisible()) | 300 if (GetTooltip()->IsVisible()) |
| 301 GetTooltip()->Hide(); | 301 GetTooltip()->Hide(); |
| 302 if (tooltip_window_) | 302 if (tooltip_window_) |
| 303 tooltip_window_->RemoveObserver(this); | 303 tooltip_window_->RemoveObserver(this); |
| 304 tooltip_window_ = NULL; | 304 tooltip_window_ = NULL; |
| 305 return ui::TOUCH_STATUS_UNKNOWN; | 305 return ui::TOUCH_STATUS_UNKNOWN; |
| 306 } | 306 } |
| 307 | 307 |
| 308 ui::GestureStatus TooltipController::PreHandleGestureEvent( | 308 ui::EventResult TooltipController::PreHandleGestureEvent( |
| 309 aura::Window* target, | 309 aura::Window* target, |
| 310 ui::GestureEvent* event) { | 310 ui::GestureEvent* event) { |
| 311 return ui::GESTURE_STATUS_UNKNOWN; | 311 return ui::ER_UNHANDLED; |
| 312 } | 312 } |
| 313 | 313 |
| 314 void TooltipController::OnWindowDestroyed(aura::Window* window) { | 314 void TooltipController::OnWindowDestroyed(aura::Window* window) { |
| 315 if (tooltip_window_ == window) { | 315 if (tooltip_window_ == window) { |
| 316 tooltip_window_->RemoveObserver(this); | 316 tooltip_window_->RemoveObserver(this); |
| 317 tooltip_window_ = NULL; | 317 tooltip_window_ = NULL; |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 //////////////////////////////////////////////////////////////////////////////// | 321 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 470 } |
| 471 | 471 |
| 472 TooltipController::Tooltip* TooltipController::GetTooltip() { | 472 TooltipController::Tooltip* TooltipController::GetTooltip() { |
| 473 if (!tooltip_.get()) | 473 if (!tooltip_.get()) |
| 474 tooltip_.reset(new Tooltip); | 474 tooltip_.reset(new Tooltip); |
| 475 return tooltip_.get(); | 475 return tooltip_.get(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 } // namespace internal | 478 } // namespace internal |
| 479 } // namespace ash | 479 } // namespace ash |
| OLD | NEW |