| 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/mouse_watcher.h" | 5 #include "ui/views/mouse_watcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "ui/base/events/event_constants.h" | 12 #include "ui/base/events/event_constants.h" |
| 13 #include "ui/base/events/event_utils.h" | 13 #include "ui/base/events/event_utils.h" |
| 14 #include "ui/gfx/screen.h" | 14 #include "ui/gfx/screen.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 | 17 |
| 18 // Amount of time between when the mouse moves outside the Host's zone and when | 18 // Amount of time between when the mouse moves outside the Host's zone and when |
| 19 // the listener is notified. | 19 // the listener is notified. |
| 20 const int kNotifyListenerTimeMs = 300; | 20 const int kNotifyListenerTimeMs = 300; |
| 21 | 21 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void MouseWatcher::Stop() { | 148 void MouseWatcher::Stop() { |
| 149 observer_.reset(NULL); | 149 observer_.reset(NULL); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void MouseWatcher::NotifyListener() { | 152 void MouseWatcher::NotifyListener() { |
| 153 observer_.reset(NULL); | 153 observer_.reset(NULL); |
| 154 listener_->MouseMovedOutOfHost(); | 154 listener_->MouseMovedOutOfHost(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace views | 157 } // namespace views |
| OLD | NEW |