| 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 "ui/views/corewm/tooltip_controller.h" | 5 #include "ui/views/corewm/tooltip_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 break; | 117 break; |
| 118 } | 118 } |
| 119 return NULL; | 119 return NULL; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace | 122 } // namespace |
| 123 | 123 |
| 124 //////////////////////////////////////////////////////////////////////////////// | 124 //////////////////////////////////////////////////////////////////////////////// |
| 125 // TooltipController public: | 125 // TooltipController public: |
| 126 | 126 |
| 127 TooltipController::TooltipController(scoped_ptr<Tooltip> tooltip) | 127 TooltipController::TooltipController(std::unique_ptr<Tooltip> tooltip) |
| 128 : tooltip_window_(NULL), | 128 : tooltip_window_(NULL), |
| 129 tooltip_id_(NULL), | 129 tooltip_id_(NULL), |
| 130 tooltip_window_at_mouse_press_(NULL), | 130 tooltip_window_at_mouse_press_(NULL), |
| 131 tooltip_(std::move(tooltip)), | 131 tooltip_(std::move(tooltip)), |
| 132 tooltips_enabled_(true) { | 132 tooltips_enabled_(true) { |
| 133 tooltip_timer_.Start(FROM_HERE, | 133 tooltip_timer_.Start(FROM_HERE, |
| 134 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs), | 134 base::TimeDelta::FromMilliseconds(kTooltipTimeoutMs), |
| 135 this, &TooltipController::TooltipTimerFired); | 135 this, &TooltipController::TooltipTimerFired); |
| 136 } | 136 } |
| 137 | 137 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 return; | 378 return; |
| 379 if (tooltip_window_) | 379 if (tooltip_window_) |
| 380 tooltip_window_->RemoveObserver(this); | 380 tooltip_window_->RemoveObserver(this); |
| 381 tooltip_window_ = target; | 381 tooltip_window_ = target; |
| 382 if (tooltip_window_) | 382 if (tooltip_window_) |
| 383 tooltip_window_->AddObserver(this); | 383 tooltip_window_->AddObserver(this); |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace corewm | 386 } // namespace corewm |
| 387 } // namespace views | 387 } // namespace views |
| OLD | NEW |