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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 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 | Annotate | Revision Log
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 21 matching lines...) Expand all
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 #if defined(OS_WIN) && !defined(USE_AURA) 39 #if defined(OS_WIN) && !defined(USE_AURA)
40 gfx::Point cursor_point(GetMessagePos()); 40 gfx::Point cursor_point(GetMessagePos());
41 #else 41 #else
42 gfx::Point cursor_point = gfx::Screen::GetCursorScreenPoint(); 42 // TODO(scottmg): Native is wrong: http://crbug.com/133312
43 gfx::Point cursor_point =
44 gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
43 #endif 45 #endif
44 ui::MouseEvent event(ui::ET_MOUSE_RELEASED, 46 ui::MouseEvent event(ui::ET_MOUSE_RELEASED,
45 cursor_point, cursor_point, 47 cursor_point, cursor_point,
46 ui::EF_LEFT_MOUSE_BUTTON); 48 ui::EF_LEFT_MOUSE_BUTTON);
47 Button::NotifyClick(event); 49 Button::NotifyClick(event);
48 } 50 }
49 51
50 } // namespace views 52 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698