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

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

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse event constructor Created 3 years, 8 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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 985
986 void Widget::SynthesizeMouseMoveEvent() { 986 void Widget::SynthesizeMouseMoveEvent() {
987 // In screen coordinate. 987 // In screen coordinate.
988 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation(); 988 gfx::Point mouse_location = EventMonitor::GetLastMouseLocation();
989 if (!GetWindowBoundsInScreen().Contains(mouse_location)) 989 if (!GetWindowBoundsInScreen().Contains(mouse_location))
990 return; 990 return;
991 991
992 // Convert: screen coordinate -> widget coordinate. 992 // Convert: screen coordinate -> widget coordinate.
993 View::ConvertPointFromScreen(root_view_.get(), &mouse_location); 993 View::ConvertPointFromScreen(root_view_.get(), &mouse_location);
994 last_mouse_event_was_move_ = false; 994 last_mouse_event_was_move_ = false;
995 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, mouse_location, 995 ui::MouseEvent mouse_event(
996 mouse_location, ui::EventTimeForNow(), 996 ui::ET_MOUSE_MOVED, mouse_location, mouse_location, ui::EventTimeForNow(),
997 ui::EF_IS_SYNTHESIZED, 0); 997 ui::EF_IS_SYNTHESIZED, 0,
998 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
999 ui::PointerEvent::kMousePointerId));
998 root_view_->OnMouseMoved(mouse_event); 1000 root_view_->OnMouseMoved(mouse_event);
999 } 1001 }
1000 1002
1001 bool Widget::IsTranslucentWindowOpacitySupported() const { 1003 bool Widget::IsTranslucentWindowOpacitySupported() const {
1002 return native_widget_->IsTranslucentWindowOpacitySupported(); 1004 return native_widget_->IsTranslucentWindowOpacitySupported();
1003 } 1005 }
1004 1006
1005 void Widget::OnSizeConstraintsChanged() { 1007 void Widget::OnSizeConstraintsChanged() {
1006 native_widget_->OnSizeConstraintsChanged(); 1008 native_widget_->OnSizeConstraintsChanged();
1007 non_client_view_->SizeConstraintsChanged(); 1009 non_client_view_->SizeConstraintsChanged();
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 1569
1568 //////////////////////////////////////////////////////////////////////////////// 1570 ////////////////////////////////////////////////////////////////////////////////
1569 // internal::NativeWidgetPrivate, NativeWidget implementation: 1571 // internal::NativeWidgetPrivate, NativeWidget implementation:
1570 1572
1571 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1573 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1572 return this; 1574 return this;
1573 } 1575 }
1574 1576
1575 } // namespace internal 1577 } // namespace internal
1576 } // namespace views 1578 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698