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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 GetTooltip()->Hide(); | 288 GetTooltip()->Hide(); |
289 break; | 289 break; |
290 default: | 290 default: |
291 break; | 291 break; |
292 } | 292 } |
293 return false; | 293 return false; |
294 } | 294 } |
295 | 295 |
296 ui::TouchStatus TooltipController::PreHandleTouchEvent( | 296 ui::TouchStatus TooltipController::PreHandleTouchEvent( |
297 aura::Window* target, | 297 aura::Window* target, |
298 ui::TouchEventImpl* event) { | 298 ui::TouchEvent* event) { |
299 // TODO(varunjain): need to properly implement tooltips for | 299 // TODO(varunjain): need to properly implement tooltips for |
300 // touch events. | 300 // touch events. |
301 // Hide the tooltip for touch events. | 301 // Hide the tooltip for touch events. |
302 if (GetTooltip()->IsVisible()) | 302 if (GetTooltip()->IsVisible()) |
303 GetTooltip()->Hide(); | 303 GetTooltip()->Hide(); |
304 if (tooltip_window_) | 304 if (tooltip_window_) |
305 tooltip_window_->RemoveObserver(this); | 305 tooltip_window_->RemoveObserver(this); |
306 tooltip_window_ = NULL; | 306 tooltip_window_ = NULL; |
307 return ui::TOUCH_STATUS_UNKNOWN; | 307 return ui::TOUCH_STATUS_UNKNOWN; |
308 } | 308 } |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 } | 472 } |
473 | 473 |
474 TooltipController::Tooltip* TooltipController::GetTooltip() { | 474 TooltipController::Tooltip* TooltipController::GetTooltip() { |
475 if (!tooltip_.get()) | 475 if (!tooltip_.get()) |
476 tooltip_.reset(new Tooltip); | 476 tooltip_.reset(new Tooltip); |
477 return tooltip_.get(); | 477 return tooltip_.get(); |
478 } | 478 } |
479 | 479 |
480 } // namespace internal | 480 } // namespace internal |
481 } // namespace ash | 481 } // namespace ash |
OLD | NEW |