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

Side by Side Diff: ui/views/controls/scrollbar/base_scroll_bar_button.cc

Issue 191723003: Nukes USE_AURA ifdefs from views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/resize_area.cc ('k') | ui/views/controls/single_split_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gfx/screen.h" 9 #include "ui/gfx/screen.h"
10 10
(...skipping 17 matching lines...) Expand all
28 void BaseScrollBarButton::OnMouseReleased(const ui::MouseEvent& event) { 28 void BaseScrollBarButton::OnMouseReleased(const ui::MouseEvent& event) {
29 OnMouseCaptureLost(); 29 OnMouseCaptureLost();
30 } 30 }
31 31
32 void BaseScrollBarButton::OnMouseCaptureLost() { 32 void BaseScrollBarButton::OnMouseCaptureLost() {
33 repeater_.Stop(); 33 repeater_.Stop();
34 } 34 }
35 35
36 void BaseScrollBarButton::RepeaterNotifyClick() { 36 void BaseScrollBarButton::RepeaterNotifyClick() {
37 // TODO(sky): See if we can convert to using |Screen| everywhere. 37 // TODO(sky): See if we can convert to using |Screen| everywhere.
38 #if defined(OS_WIN) && !defined(USE_AURA)
39 gfx::Point cursor_point(GetMessagePos());
40 #else
41 // TODO(scottmg): Native is wrong: http://crbug.com/133312 38 // TODO(scottmg): Native is wrong: http://crbug.com/133312
42 gfx::Point cursor_point = 39 gfx::Point cursor_point =
43 gfx::Screen::GetNativeScreen()->GetCursorScreenPoint(); 40 gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
44 #endif
45 ui::MouseEvent event(ui::ET_MOUSE_RELEASED, 41 ui::MouseEvent event(ui::ET_MOUSE_RELEASED,
46 cursor_point, cursor_point, 42 cursor_point, cursor_point,
47 ui::EF_LEFT_MOUSE_BUTTON, 43 ui::EF_LEFT_MOUSE_BUTTON,
48 ui::EF_LEFT_MOUSE_BUTTON); 44 ui::EF_LEFT_MOUSE_BUTTON);
49 Button::NotifyClick(event); 45 Button::NotifyClick(event);
50 } 46 }
51 47
52 } // namespace views 48 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/resize_area.cc ('k') | ui/views/controls/single_split_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698