Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: ui/views/widget/widget.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 990
991 void Widget::SynthesizeMouseMoveEvent() { 991 void Widget::SynthesizeMouseMoveEvent() {
992 // In screen coordinate. 992 // In screen coordinate.
993 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation(); 993 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation();
994 if (!GetWindowBoundsInScreen().Contains(mouse_location)) 994 if (!GetWindowBoundsInScreen().Contains(mouse_location))
995 return; 995 return;
996 996
997 // Convert: screen coordinate -> widget coordinate. 997 // Convert: screen coordinate -> widget coordinate.
998 View::ConvertPointFromScreen(root_view_.get(), &mouse_location); 998 View::ConvertPointFromScreen(root_view_.get(), &mouse_location);
999 last_mouse_event_was_move_ = false; 999 last_mouse_event_was_move_ = false;
1000 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, mouse_location, 1000 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, gfx::PointF(mouse_location),
1001 mouse_location, ui::EventTimeForNow(), 1001 gfx::PointF(mouse_location), ui::EventTimeForNow(),
1002 ui::EF_IS_SYNTHESIZED, 0); 1002 ui::EF_IS_SYNTHESIZED, 0);
1003 root_view_->OnMouseMoved(mouse_event); 1003 root_view_->OnMouseMoved(mouse_event);
1004 } 1004 }
1005 1005
1006 void Widget::OnRootViewLayout() { 1006 void Widget::OnRootViewLayout() {
1007 native_widget_->OnRootViewLayout(); 1007 native_widget_->OnRootViewLayout();
1008 } 1008 }
1009 1009
1010 bool Widget::IsTranslucentWindowOpacitySupported() const { 1010 bool Widget::IsTranslucentWindowOpacitySupported() const {
1011 return native_widget_->IsTranslucentWindowOpacitySupported(); 1011 return native_widget_->IsTranslucentWindowOpacitySupported();
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1491
1492 //////////////////////////////////////////////////////////////////////////////// 1492 ////////////////////////////////////////////////////////////////////////////////
1493 // internal::NativeWidgetPrivate, NativeWidget implementation: 1493 // internal::NativeWidgetPrivate, NativeWidget implementation:
1494 1494
1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1495 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1496 return this; 1496 return this;
1497 } 1497 }
1498 1498
1499 } // namespace internal 1499 } // namespace internal
1500 } // namespace views 1500 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698