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

Side by Side Diff: ui/views/controls/scrollbar/base_scroll_bar_button.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/controls/scrollbar/base_scroll_bar_button.h" 5 #include "ui/views/controls/scrollbar/base_scroll_bar_button.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "ui/display/screen.h" 9 #include "ui/display/screen.h"
10 #include "ui/events/event_utils.h" 10 #include "ui/events/event_utils.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void BaseScrollBarButton::OnMouseCaptureLost() { 33 void BaseScrollBarButton::OnMouseCaptureLost() {
34 repeater_.Stop(); 34 repeater_.Stop();
35 } 35 }
36 36
37 void BaseScrollBarButton::RepeaterNotifyClick() { 37 void BaseScrollBarButton::RepeaterNotifyClick() {
38 // TODO(sky): See if we can convert to using |Screen| everywhere. 38 // TODO(sky): See if we can convert to using |Screen| everywhere.
39 gfx::Point cursor_point = 39 gfx::Point cursor_point =
40 display::Screen::GetScreen()->GetCursorScreenPoint(); 40 display::Screen::GetScreen()->GetCursorScreenPoint();
41 ui::MouseEvent event(ui::ET_MOUSE_RELEASED, cursor_point, cursor_point, 41 ui::MouseEvent event(
42 ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, 42 ui::ET_MOUSE_RELEASED, cursor_point, cursor_point, ui::EventTimeForNow(),
43 ui::EF_LEFT_MOUSE_BUTTON); 43 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
44 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE,
45 ui::PointerEvent::kMousePointerId));
44 Button::NotifyClick(event); 46 Button::NotifyClick(event);
45 } 47 }
46 48
47 } // namespace views 49 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698