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

Unified Diff: ui/views/controls/scrollbar/base_scroll_bar_button.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/scrollbar/base_scroll_bar_button.cc
diff --git a/ui/views/controls/scrollbar/base_scroll_bar_button.cc b/ui/views/controls/scrollbar/base_scroll_bar_button.cc
deleted file mode 100644
index 0a765c429629857e5affbea00d26a874d1cb4070..0000000000000000000000000000000000000000
--- a/ui/views/controls/scrollbar/base_scroll_bar_button.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/controls/scrollbar/base_scroll_bar_button.h"
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "ui/gfx/screen.h"
-
-namespace views {
-
-BaseScrollBarButton::BaseScrollBarButton(ButtonListener* listener)
- : CustomButton(listener),
- repeater_(base::Bind(&BaseScrollBarButton::RepeaterNotifyClick,
- base::Unretained(this))) {
-}
-
-BaseScrollBarButton::~BaseScrollBarButton() {
-}
-
-bool BaseScrollBarButton::OnMousePressed(const ui::MouseEvent& event) {
- Button::NotifyClick(event);
- repeater_.Start();
- return true;
-}
-
-void BaseScrollBarButton::OnMouseReleased(const ui::MouseEvent& event) {
- OnMouseCaptureLost();
-}
-
-void BaseScrollBarButton::OnMouseCaptureLost() {
- repeater_.Stop();
-}
-
-void BaseScrollBarButton::RepeaterNotifyClick() {
- // TODO(sky): See if we can convert to using |Screen| everywhere.
- // TODO(scottmg): Native is wrong: http://crbug.com/133312
- gfx::Point cursor_point =
- gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
- ui::MouseEvent event(ui::ET_MOUSE_RELEASED,
- cursor_point, cursor_point,
- ui::EF_LEFT_MOUSE_BUTTON,
- ui::EF_LEFT_MOUSE_BUTTON);
- Button::NotifyClick(event);
-}
-
-} // namespace views
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar_button.h ('k') | ui/views/controls/scrollbar/base_scroll_bar_thumb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698