| 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/widget/widget.h" | 5 #include "ui/views/widget/widget.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 | 998 |
| 999 void Widget::SynthesizeMouseMoveEvent() { | 999 void Widget::SynthesizeMouseMoveEvent() { |
| 1000 // In screen coordinate. | 1000 // In screen coordinate. |
| 1001 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation(); | 1001 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation(); |
| 1002 if (!GetWindowBoundsInScreen().Contains(mouse_location)) | 1002 if (!GetWindowBoundsInScreen().Contains(mouse_location)) |
| 1003 return; | 1003 return; |
| 1004 | 1004 |
| 1005 // Convert: screen coordinate -> widget coordinate. | 1005 // Convert: screen coordinate -> widget coordinate. |
| 1006 View::ConvertPointFromScreen(root_view_.get(), &mouse_location); | 1006 View::ConvertPointFromScreen(root_view_.get(), &mouse_location); |
| 1007 last_mouse_event_was_move_ = false; | 1007 last_mouse_event_was_move_ = false; |
| 1008 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, mouse_location, | 1008 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, gfx::PointF(mouse_location), |
| 1009 mouse_location, ui::EventTimeForNow(), | 1009 gfx::PointF(mouse_location), ui::EventTimeForNow(), |
| 1010 ui::EF_IS_SYNTHESIZED, 0); | 1010 ui::EF_IS_SYNTHESIZED, 0); |
| 1011 root_view_->OnMouseMoved(mouse_event); | 1011 root_view_->OnMouseMoved(mouse_event); |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 void Widget::OnRootViewLayout() { | 1014 void Widget::OnRootViewLayout() { |
| 1015 native_widget_->OnRootViewLayout(); | 1015 native_widget_->OnRootViewLayout(); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 bool Widget::IsTranslucentWindowOpacitySupported() const { | 1018 bool Widget::IsTranslucentWindowOpacitySupported() const { |
| 1019 return native_widget_->IsTranslucentWindowOpacitySupported(); | 1019 return native_widget_->IsTranslucentWindowOpacitySupported(); |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 | 1499 |
| 1500 //////////////////////////////////////////////////////////////////////////////// | 1500 //////////////////////////////////////////////////////////////////////////////// |
| 1501 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1501 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1502 | 1502 |
| 1503 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1503 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1504 return this; | 1504 return this; |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 } // namespace internal | 1507 } // namespace internal |
| 1508 } // namespace views | 1508 } // namespace views |
| OLD | NEW |